El-POM1001
/
LAB05_Oppgave2
LCD
Diff: main.cpp
- Revision:
- 0:90cc69dbc509
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Oct 15 15:57:34 2015 +0000 @@ -0,0 +1,30 @@ +#include "mbed.h" +#include "TextLCD.h" + +TextLCD lcd(D11,D10,D9,D5,D4,D3,D2); + +void BlinkCursor(bool); + +int main() +{ + lcd.gotoxy(1,1); + lcd.printf("Hello"); + + lcd.gotoxy(4,2); + lcd.printf("World"); + + BlinkCursor(0); + + while(1) { + wait_ms(300); + } +} + +void BlinkCursor(bool OnOff) +{ + if(OnOff)lcd.lcdComand(0x0F); + else lcd.lcdComand(0x0C); +} + + +