uwizeyimana abdulkarim / Mbed 2 deprecated mobileproject

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
uwizeyimana
Date:
Mon Jul 12 15:31:13 2021 +0000
Parent:
10:bdd6069f1345
Commit message:
update

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- 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