Update main.c
Dieser Commit ist enthalten in:
Ursprung
42efe6abad
Commit
ca79fdbabb
13
main.c
13
main.c
@ -7,22 +7,23 @@
|
|||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <avr/io.h>
|
#include <avr/io.h>
|
||||||
#include <avr/interrupt.h>
|
|
||||||
#include "i2c.h"
|
#include "i2c.h"
|
||||||
#include "lcd.h"
|
#include "lcd.h"
|
||||||
|
|
||||||
int main(void)
|
int main(void)
|
||||||
{
|
{
|
||||||
/* insert your hardware initialization here */
|
/* init I2C-Bus */
|
||||||
i2c_init();
|
i2c_init();
|
||||||
|
/* init display, after init turn on */
|
||||||
lcd_init(LCD_DISP_ON);
|
lcd_init(LCD_DISP_ON);
|
||||||
|
/* clear screen */
|
||||||
lcd_clrscr();
|
lcd_clrscr();
|
||||||
|
/* put string from flash, cursor is at position x=0, y=0, left, top corner */
|
||||||
lcd_puts_p(PSTR("OLED Display "));
|
lcd_puts_p(PSTR("OLED Display "));
|
||||||
|
/* set cursor at begin from next line */
|
||||||
lcd_gotoxy(0,1);
|
lcd_gotoxy(0,1);
|
||||||
lcd_puts_p(PSTR("with I2C "));
|
/* put string from sram */
|
||||||
|
lcd_puts_p("with I2C ");
|
||||||
sei();
|
|
||||||
|
|
||||||
for(;;){
|
for(;;){
|
||||||
/* insert your main loop code here */
|
/* insert your main loop code here */
|
||||||
|
Laden…
x
In neuem Issue referenzieren
Einen Benutzer sperren