A weather station that uses GPS and WiFi to get the weather where you are. Almost better than actually going outside!
Dependencies: 4DGL-uLCD-SE ESP8266NodeMCUInterface GPS MbedJSONValue mbed-rtos mbed-src
query.lua@0:c4da54879553, 2016-03-13 (annotated)
- Committer:
- krbng4180
- Date:
- Sun Mar 13 21:09:49 2016 +0000
- Revision:
- 0:c4da54879553
it works!!!!!!!
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
krbng4180 | 0:c4da54879553 | 1 | LUA( |
krbng4180 | 0:c4da54879553 | 2 | sk=net.createConnection(net.TCP, 0); |
krbng4180 | 0:c4da54879553 | 3 | sk:on("receive", function(sck, c) print(c) end); |
krbng4180 | 0:c4da54879553 | 4 | sk:connect(80, "%s"); |
krbng4180 | 0:c4da54879553 | 5 | sk:send("GET /api/%s/geolookup/q/%f,%f.json HTTP/1.1\r\nHost: api.wunderground.com\r\nConnection: keep-alive\r\nAccept: */*\r\n\r\n"); |
krbng4180 | 0:c4da54879553 | 6 | ) |