LED COontrol Using Thingspeak

Dependencies:   ESP8266 mbed

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

Revision:
4:d0819505c82a
Parent:
3:1722a03793c6
Child:
6:66443813bcf4
--- a/main.cpp	Tue May 22 05:02:54 2018 +0000
+++ b/main.cpp	Thu Jul 05 05:00:53 2018 +0000
@@ -91,7 +91,7 @@
     wait(1);
     
     //create link 
-    sprintf(http_cmd,"/channels/501352/fields/1.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/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
     pc.printf(http_cmd);
     
     pc.printf("******** Sending URL to wifi ********\r\n");
@@ -117,7 +117,7 @@
     ledstatus=int(resp[length-13]);
     pc.printf("LED Status is %c\r\n",resp[length-13]);
     pc.printf("LED status is %d\r\n",ledstatus);
-    if(resp[length-13]==49){
+    if(resp[length-13]==53){
         pc.printf("LED ON");
         rled=0;
         }