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.
Dependencies: C12832 CCS811 Sht31 TSL2561
Fork of ARM_HACK_THE_BURGH by
Revision 60:49746f10fef0, committed 2018-03-11
- 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 |
--- 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();
