Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: main.cpp
- Revision:
- 11:54d3db4e073d
- Parent:
- 10:bdd6069f1345
--- a/main.cpp Mon Jul 12 15:17:31 2021 +0000 +++ b/main.cpp Mon Jul 12 15:31:13 2021 +0000 @@ -83,7 +83,7 @@ lcd.printf(sms.c_str()); } //function to display time and temp -void displayState1(){ +void PrintState1(){ float temp = theo.readTemperature(); time_t seconds = time(NULL); char buffer[32]; @@ -95,7 +95,7 @@ lcd.printf("Local Time: %s",buffer); lcd.locate(5, 9); lcd.printf("Temperature: %.2f C", temp); -} +} //function to blink white led void whiteled() { @@ -120,7 +120,7 @@ } } //direction control function -void displayState2(){ +void PrintState2(){ if(direction==0){ i=0; bed=1; @@ -143,8 +143,8 @@ //message to display after welcome message on the screen void mode1(){ k.attach(ev_queue.event(& whiteled),1.0f); - displayState1(); - t.attach(ev_queue.event(&displayState2),3.0f); + PrintState1(); + t.attach(ev_queue.event(&PrintState2),3.0f); } //message to be displayed on the screen while on start up @@ -200,7 +200,7 @@ send_message(create_message(device,topic,readingDuration)); } - displayState2(); + PrintState2(); } //count how long the button have been pushed void countDuration(){ @@ -216,7 +216,7 @@ else if(pushDuration>=3 && state==0 ){ state =1; direction=!direction; - displayState2(); + PrintState2(); } } //action to be done when button is pushed