Dependencies:   C12832 CCS811 Sht31 TSL2561

Fork of ARM_HACK_THE_BURGH by Carey Williams

Files at this revision

API Documentation at this revision

Comitter:
Ottomanslap
Date:
Sun Mar 11 02:51:01 2018 +0000
Parent:
59:22dd28696d59
Commit message:
SUCCESS

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 22dd28696d59 -r 49746f10fef0 main.cpp
--- a/main.cpp	Sat Mar 10 19:47:43 2018 +0000
+++ b/main.cpp	Sun Mar 11 02:51:01 2018 +0000
@@ -131,6 +131,7 @@
     stringbuffer += "POST /data HTTP/1.1\r\n";
     stringbuffer += "Host: " + ip + "\r\n";
     stringbuffer += "Content-Type: application/json\r\n";
+    //stringbuffer += "Cache-Control: no-cache\r\n";
     stringbuffer += "Content-Length: " + body_size_string + "\r\n";
     stringbuffer += "\r\n";
     stringbuffer += body;
@@ -205,10 +206,10 @@
     tsl2561.setGain(TSL2561_GAIN_0X);
     tsl2561.setTiming(TSL2561_INTEGRATIONTIME_402MS);
     
-    */
+    
     
-    string ip = "";
-    string port = "80";
+    string ip = "34.245.151.229";
+    string port = "5000";
     
     while(1) {
         
@@ -258,14 +259,14 @@
         
         json += "\t \"Humid\" : ";
         json += buffer;
-        json += ",\n";
+        json += "\n";
         
         json += "}\n\n";
         printf("%s", json.data());
         
         http_demo(&wifi, ip, port, json);
         
-        wait(1);
+        wait(600);
     }
     
     wifi.disconnect();