Advertisement
uuu000

Ulrich Radig ssd1306

Oct 7th, 2022
996
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.60 KB | None | 0 0
  1. /*
  2.  *  Created: 19.06.2016 11:37:00
  3.  *  Author: Ulrich
  4.  */
  5.  
  6. #include <avr/io.h>
  7. #include <util/delay.h>
  8. #include "oled_ssd1306.h"
  9.  
  10. int main(void)
  11. {
  12.     DDRB |= (1<<PB5);
  13.     oled_init();
  14.     oled_gotoxy(0,0);
  15.  
  16.     while(1){
  17.         for(uint32_t tmp = 1;tmp < 99999999; tmp++){
  18.             oled_gotoxy(0,0);
  19.             oled_write("****************");
  20.             oled_gotoxy(0,1);
  21.             oled_write("* Ulrich Radig *");
  22.             oled_gotoxy(0,2);
  23.             oled_write("****************");
  24.             oled_font_size(1);
  25.             oled_gotoxy(0,4);
  26.             oled_write("%8i",tmp); 
  27.             oled_font_size(0);
  28.             _delay_ms(100);
  29.             PORTB ^= (1<<PB5);
  30.         }          
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement