LED COontrol Using Thingspeak

Dependencies:   ESP8266 mbed

Fork of ESP8266-FRDM-KL25Z-THINGSPEAK by Karkhana Makerspace

Revision:
6:66443813bcf4
Parent:
4:d0819505c82a
--- a/main.cpp	Thu Jul 05 05:00:53 2018 +0000
+++ b/main.cpp	Sat Sep 08 09:23:21 2018 +0000
@@ -12,10 +12,10 @@
 char http_cmd[300], comm[300];
 char url_response[9000];
 
-int timeout = 5000; //timeout for wifi commands
+int timeout = 2000; //timeout for wifi commands
 
 //SSID and password for connection 
-#define SSID "Karkhana"     
+#define SSID "Airtel WeFe"     
 #define PASS "Karkhana2018"  
 void control_led(void);
 //Remote IP
@@ -25,7 +25,7 @@
 int ledstatus=0;
 
 //Public and private keys for phant
-char* Update_Key = "QRCE7DOPVY3I49YN";                   // Copy the read key for your channel and paste it here.
+char* Update_Key = "8FVB3ZBIHM1B1N6V";                 // Copy the read key for your channel and paste it here.
 //char* Private_Key = "GPoWnRM60yidrB0e1pXD";
  
 //Wifi init function. Sets the module to connect to wifi accesspoint with ssid and password mentioned above
@@ -91,7 +91,7 @@
     wait(1);
     
     //create link 
-    sprintf(http_cmd,"/channels/501352/fields/1.json&2.json?api_key=%s&results=2",Update_Key);              // Forms the url for transmitting to thingspeak server. the format can be seen on thingspeak site as well
+    sprintf(http_cmd,"/channels/532115/fields/1.json?api_key=8FVB3ZBIHM1B1N6V&results=2",Update_Key);              // Forms the url for transmitting to thingspeak server. the format can be seen on thingspeak site as well
     pc.printf(http_cmd);
     
     pc.printf("******** Sending URL to wifi ********\r\n");