eka sinambela / Mbed 2 deprecated TextLCD_Inizialization

Dependencies:   TextLCD mbed

Fork of TextLCD_HelloWorld by Simon Ford

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers main.cpp Source File

main.cpp

00001 // Hello World! for the TextLCD
00002 
00003 #include "mbed.h"
00004 #include "TextLCD.h"
00005 
00006 TextLCD lcd(p19, p20, p21, p22, p23, p24); // rs, e, d4-d7
00007 DigitalIn switchinput(p7);
00008 int main() {
00009     int message=1;
00010     while (message<8){
00011     
00012     if (switchinput==1){
00013     message++;
00014     wait(2);
00015     }
00016     
00017     if (message==1){lcd.printf("Check the water tank  \n");}
00018     if (message==2){lcd.printf("Check the solution tank  \n");}
00019     if (message==3){lcd.printf("Check the water tube  \n");}
00020     if (message==4){lcd.printf("Check the salinity tube  \n");}
00021     if (message==5){lcd.printf("Check the valves position  \n");}
00022     if (message==6){lcd.printf("Check the sirenge  \n");}
00023     if (message==7){lcd.printf("Check the sensor position  \n");}
00024     if (message==8){lcd.printf("Check the thermostat  \n");}
00025     }
00026     lcd.printf("Done, System will start in 2 sec \n");
00027     wait(2);
00028 }