Sending data to thingspeak
Dependencies: DHT ESP8266 mbed
Fork of temp_hum by
Diff: main.cpp
- Revision:
- 4:aa3e25ccc05d
- Parent:
- 3:49571dd386aa
- Child:
- 5:0d98bbc39c7b
--- a/main.cpp Thu Dec 01 04:46:38 2016 +0000 +++ b/main.cpp Sun Dec 04 21:21:05 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("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);