Deep Slumber, codename ISA, is a program made for the arm MBED during Hack The Burgh 2018 that analyses light, temperature, humidity and CO2 levels in a room. It uploads this information onto an SQL server through a rest API, providing the necessary environment for data processing. Further improvements we hope to provide are the regulation of said parameters by wifi connection to electric heaters, wifi enabled controllable lightbulbs and other iot gadgets as well as a website that will provide recommendations for sleep cycle improvements.
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 |
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();