You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
790 B
C

/* Name: main.c
* Author: <insert your name here>
* Copyright: <insert your copyright message here>
* License: <insert your license reference here>
*/
#include <stdlib.h>
#include <avr/io.h>
#include "i2c.h"
#include "lcd.h"
int main(void)
{
6 years ago
/* init I2C-Bus, for settings look at i2c.h */
i2c_init();
6 years ago
/* init display, after init turn on */
lcd_init(LCD_DISP_ON);
6 years ago
/* clear screen */
lcd_clrscr();
6 years ago
/* put string from flash, cursor is at position x=0, y=0, left, top corner */
lcd_puts_p(PSTR("OLED Display "));
6 years ago
/* set cursor at begin from next line */
lcd_gotoxy(0,1);
6 years ago
/* put string from sram */
lcd_puts_p("with I2C ");
for(;;){
/* insert your main loop code here */
}
return 0; /* never reached */
}