El-POM1001
/
LAB05_Oppgave3
LCD
Fork of KS0066U4_16x2 by
Diff: main.cpp
- Revision:
- 4:afa73d3e1a34
- Parent:
- 3:81d65a2a1920
--- a/main.cpp Mon Sep 21 10:18:03 2015 +0000 +++ b/main.cpp Thu Oct 15 15:58:27 2015 +0000 @@ -2,15 +2,28 @@ #include "TextLCD.h" TextLCD lcd(D11,D10,D9,D5,D4,D3,D2); + + + void BlinkCursor(bool); + int main() { - lcd.gotoxy(1,1); - lcd.printf("Hello"); + int iCounter = 0; + + while(1) + { + lcd.gotoxy(1,1); + lcd.printf("Nr: %d", iCounter); + lcd.gotoxy(1,2); + lcd.printf("Nr: %d", iCounter+1); + iCounter++; + wait_ms(500); + } + } - lcd.gotoxy(4,2); - lcd.printf("World"); - - while(1) { - wait_ms(300); - } - } \ No newline at end of file + + void BlinkCursor(bool OnOff) +{ + if(OnOff)lcd.lcdComand(0x0F); + else lcd.lcdComand(0x0C); +} \ No newline at end of file