Chinmay Das
/
HELLO_WORLD_Text_LCD
Display test code
main.cpp
- Committer:
- chinmay
- Date:
- 2011-05-29
- Revision:
- 0:a4637c5dc734
File content as of revision 0:a4637c5dc734:
#include "TextLCD.h" #include "mbed.h" TextLCD lcd(p15, p16, p17, p18, p19, p20, TextLCD::LCD20x4); // rs, e, d4-d7 DigitalOut led1(LED1); DigitalOut led2(LED2); DigitalOut led3(LED3); DigitalOut led4(LED4); int main() { while(1) { lcd.cls(); wait(0.5); led1=1; lcd.locate(0,0); lcd.printf("Hello World1\n"); wait(5); led2=1; lcd.locate(6,1); lcd.printf("Hello World2\n"); wait(5); led3=1; lcd.locate(0,2); lcd.printf("Hello World3\n"); wait(5); led4=1; lcd.locate(8,3); lcd.printf("Hello World4\n"); wait(0.5); led1=0; led2=0; led3=0; led4=0; lcd.cls(); } }