Sending data to thingspeak
Dependencies: DHT ESP8266 mbed
Fork of temp_hum by
Diff: main.cpp
- Revision:
- 2:9c7b37890692
- Parent:
- 1:402b14b56d24
- Child:
- 3:49571dd386aa
--- a/main.cpp Tue Nov 29 14:01:15 2016 +0000 +++ b/main.cpp Tue Nov 29 14:19:30 2016 +0000 @@ -18,7 +18,7 @@ wifi.RcvReply(rcv, 1000); //receive a response from ESP pc.printf("%s",rcv); //Print the response onscreen pc.printf("Conneting to Wifi\r\n"); - wifi.Join("533B", "ransom007"); // Your wifi username & Password + wifi.Join("your ssid", "password"); // Your wifi username & Password wifi.RcvReply(rcv, 1000); //receive a response from ESP pc.printf("%s\n", rcv); //Print the response onscreen wait(8); //waits for response from ESP @@ -74,11 +74,11 @@ wifi.RcvReply(rcv, 1000); pc.printf("%s\n", rcv); wait(2); - sprintf(snd,"GET http://api.thingspeak.com/update?api_key=NVG5E6ZAB970OMRF&field1=%1.3f\n", c); //Post values to thingspeak + sprintf(snd,"GET http://api.thingspeak.com/update?api_key=************&field1=%1.3f\n", c); //Post values to thingspeak pc.printf("%s",snd); wifi.SendCMD(snd); wait(2); - sprintf(snd,"GET http://api.thingspeak.com/update?api_key=NVG5E6ZAB970OMRF&field2=%1.3f\n", h); //Post values to thingspeak + sprintf(snd,"GET http://api.thingspeak.com/update?api_key=************&field2=%1.3f\n", h); //Post values to thingspeak pc.printf("%s",snd); wifi.SendCMD(snd); wait(2);