![](/media/cache/profiles/11cf64477f05083e07d651ad5df5664a.jpg.50x50_q85.jpg)
LCD Hello World Program
Fork of 04LCD_Hello_Word by
Diff: main.cpp
- Revision:
- 1:99f6b4191e94
- Parent:
- 0:9dc21787f133
- Child:
- 2:fae7972e0801
diff -r 9dc21787f133 -r 99f6b4191e94 main.cpp --- a/main.cpp Mon May 19 10:20:36 2014 +0000 +++ b/main.cpp Tue May 27 07:30:09 2014 +0000 @@ -1,12 +1,16 @@ -#include "mbed.h" - -DigitalOut myled(LED1); +#include "mbed.h" //header file +#include "LCD.h" -int main() { - while(1) { - myled = 1; - wait(0.2); - myled = 0; - wait(0.2); - } +DigitalOut myled(LED1); +int main() { +while(1) { +LCD_init(); //initialising LCD + display_to_LCD(0x48); // “H‟ + display_to_LCD(0x45); // “E‟ + display_to_LCD(0x4C); // “L‟ + display_to_LCD(0x4C); // “L‟ +display_to_LCD(0x4F); // “O‟ + wait(1); + } +}