projet Gestion d'énergie
/
gestionenergie
LCD Hello World Program
Diff: main.cpp
- Revision:
- 1:99f6b4191e94
- Parent:
- 0:9dc21787f133
- Child:
- 2:15da1c028052
--- 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); + } +}