Pratit Nayak
/
ESP8266-FRDM-KL25Z-THINGSPEAK
q
Fork of ESP8266-FRDM-KL25Z-THINGSPEAK by
Diff: main.cpp
- Revision:
- 3:8a57b17395b2
- Parent:
- 2:97dbf542ebee
--- a/main.cpp Sun Dec 03 13:10:28 2017 +0000 +++ b/main.cpp Wed May 30 07:24:54 2018 +0000 @@ -17,8 +17,8 @@ int timeout = 8000; //timeout for wifi commands //SSID and password for connection -#define SSID "Tenda_43DA50" -#define PASS "Karkhana" +#define SSID "Karkhana" +#define PASS "Karkhana2018" //Remote IP #define IP "184.106.153.149" // 52.202.122.57 @@ -27,8 +27,7 @@ float litvalue = 0; //Update key for thingspeak -char* Update_Key = "P2GMSKA9NY7KV0LW"; - +char* Update_Key = "OV89R9NLAIJ9NGJ5"; //Wifi init function void wifi_initialize(void) { @@ -99,7 +98,7 @@ wait(1); //create link - sprintf(http_cmd,"/update?api_key=%s&field2=%f&field1=%f",Update_Key,litvalue,potvalue); + sprintf(http_cmd,"/update?api_key=%s&field1=%f&field2=%f",Update_Key,potvalue,litvalue); pc.printf(http_cmd); @@ -120,6 +119,6 @@ pc.printf("Current potvalue is = %.3f \r\n", potvalue); pc.printf("Current light value is = %.3f \r\n", litvalue); wifi_send(); - wait(30); + wait(1); } } \ No newline at end of file