prova codice locale

Dependencies:   mbed ESP8266 Servo

Files at this revision

API Documentation at this revision

Comitter:
vidica94
Date:
Thu Oct 13 16:41:18 2016 +0000
Parent:
6:3bb8c63c1561
Commit message:
versione per guido ;

Changed in this revision

com.cpp Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 3bb8c63c1561 -r c79c53363102 com.cpp
--- a/com.cpp	Sun Oct 09 09:06:46 2016 +0000
+++ b/com.cpp	Thu Oct 13 16:41:18 2016 +0000
@@ -22,7 +22,7 @@
 
 void send_data(ESP8266 &esp,int idx,int val)
 {
-    strcpy(snd, "AT+CIPSTART=0,\"TCP\",\"192.168.1.100\",8080");//apertura connessione protocollo tcp
+    strcpy(snd, "AT+CIPSTART=0,\"TCP\",\"192.168.1.101\",8080");//apertura connessione protocollo tcp
     esp.SendCMD(snd);
     esp.RcvReply(rcv, 4000);
     sprintf(comando,"GET /json.htm?type=command&param=udevice&idx=%d&nvalue=%d&svalue=80 HTTP/1.1\r\n\r\n",idx,val);
diff -r 3bb8c63c1561 -r c79c53363102 main.cpp
--- a/main.cpp	Sun Oct 09 09:06:46 2016 +0000
+++ b/main.cpp	Thu Oct 13 16:41:18 2016 +0000
@@ -134,7 +134,7 @@
         }
         wait(0.2); // 200 ms
        //  pc.printf("la temperatura ambiente è %f\n",temperatura);
-      /*  if(++time_to_send_data == SEND_TIME)//Invio i dagtiì
+        if(++time_to_send_data == SEND_TIME)//Invio i dagtiì
         {//è arrivato finalmente il tempo di inviare!
             time_to_send_data^=time_to_send_data;//=0;
             connect(esp);
@@ -143,6 +143,6 @@
             perc = (int)(TOT_RUGIADA*umid/100.0);
             send_data(esp,3,perc);
             disconnect(esp);
-        }*/
+        }
     }
 }