Search for thingspeak in Topics


to print a text in thingspeak from my arduino using esp8266

Can i print a text in thingspeak by including it as a string in my arduino code ?? Can i use Google doc or some other platform to print this text ?

Question by satrujit.mohanty  


ESP8266 wifi module data logger? Answered

​hello everyone, can anybody do a simpler project with this? I just want to collect data using arduino Analog0 input with an LDR photoresistor. collect the data and simply post it on Thingspeak ?!?! . all the examples I find are very complicated and include libraries. I need my project to be much simpler. just read some data from the analog sensor and display the value on the cloud. . can anybody please help me with this? I have updated the firmware on my ESP8266 and I can connect to my house network using the CoolTerm software. . any help is highly appreciated !!! thank you, akin . useful links 1. http://www.electrodragon.com/w/Wi07c 2. http://www.esp8266.com/ 3. http://www.espruino.com/ESP8266 4. https://nurdspace.nl/ESP8266 5. http://hackaday.com/tag/esp8266/

Question by Akin Yildiz    |  last reply


Data updating on thingspeak (cloude) only once

 I am trying to update Thingspeak using Edison. It updates thingspeak but only at once. If I have to update again I have to run the code again. #include #include // ThingSpeak Settings char thingSpeakAddress[] = "api.thingspeak.com";  //TS String writeAPIKey = "**************";    //TS const int updateThingSpeakInterval = 20 * 1000;      // Time interval in milliseconds to update ThingSpeak (number of seconds * 1000 = interval) char ssid[] = "*********";     //  your network SSID (name) char pass[] = "*********";  // your network password int status = WL_IDLE_STATUS;     // the Wifi radio's status // initialize the library instance: WiFiClient client; String stringVal = ""; // Variable Setup long lastConnectionTime = 0; boolean lastConnected = false; int failedCounter = 0; int a; float tempC; int B=3975; float resistance; void setup() {   //Initialize serial and wait for port to open:   Serial.begin(115200);    while (!Serial) {     } //  check for the presence of the shield: // if (WiFi.status() == WL_NO_SHIELD) {   //   Serial.println("WiFi shield not present");     // don't continue:     //while(true); //} // attempt to connect to Wifi network:   while ( status != WL_CONNECTED) {     Serial.print("Attempting to connect to WPA SSID: ");     Serial.println(ssid);     // Connect to WPA/WPA2 network:       status = WiFi.begin(ssid, pass);     // wait 10 seconds for connection:     delay(10000);      }     // you're connected now, so print out the data:   Serial.println("You're connected to the network");   // printCurrentNet();   // printWifiData(); }   void loop() { a = analogRead(0); resistance=(float)(1023-a)*10000/a; tempC=1/(log(resistance/10000)/B+1/298.15)-273.15; // converts temp  to string      stringVal += String(int(tempC))+ "."+String(getDecimal(tempC)); //char buf[16]; //String strTemp = floatToString(16 , cel , 5); //Serial.println(strTemp); // Print Update Response to Serial Monitor   while (client.available())   {     char c = client.read();     Serial.print(c);   }   // Disconnect from ThingSpeak   if (!client.connected() && lastConnected )   {     Serial.println("...disconnected");     Serial.println();        client.stop();     }   // Update ThingSpeak   if(client.connected() && (millis() - lastConnectionTime > updateThingSpeakInterval))   {     updateThingSpeak("field1="+stringVal);      Serial.print( stringVal);          Serial.println("C");      delay(1000);      Serial.println();         }   lastConnected = client.connected(); } //function to extract decimal part of float long getDecimal(float val) { int intPart = int(val); long decPart = 100*(val-intPart); //I am multiplying by 100 assuming that the foat values will have a maximum of 3 decimal places                                    //Change to match the number of decimal places you need if(decPart>0)return(decPart);           //return the decimal part of float number if it is available else if(decPart<0)return((-1)*decPart); //if negative, multiply by -1 else if(decPart=0)return(00);           //return 0 if decimal part of float number is not available } void updateThingSpeak(String  stringVal) {   if (client.connect(thingSpeakAddress, 80))   {            client.print("POST /update HTTP/1.1\n");     client.print("Host: api.thingspeak.com\n");     client.print("Connection: close\n");     client.print("X-THINGSPEAKAPIKEY: "+writeAPIKey+"\n");     client.print("Content-Type: application/x-www-form-urlencoded\n");     client.print("Content-Length: ");     client.print( stringVal.length());     client.print("\n\n");     client.print( stringVal);        lastConnectionTime = millis();        if (client.connected())     {       Serial.println("Connecting to ThingSpeak...");       Serial.println();            failedCounter = 0;     }     else     {       failedCounter++;       Serial.println("Connection to ThingSpeak failed ("+String(failedCounter, DEC)+")");        Serial.println();     }      }   else   {     failedCounter++;        Serial.println("Connection to ThingSpeak Failed ("+String(failedCounter, DEC)+")");      Serial.println();        lastConnectionTime = millis();   } } after running this code I get this(image attached)

Question by ANINDYAB5    |  last reply


An Idea for a Connected & Automated Healthcare Platform.

 Watch video demonstration of our Idea of a Connected and Automated healthcare platform. This project is part of a compitition so we need to popularize our video to go ahead into finals. If you like our Idea please share that Youtube link, more view means greater chances of clearing this round. Thank you. YouTube Link: http://youtu.be/J413BVBs6so

Topic by nikhilmaurya10  


IoT server / gateway

Hello Instructables, Like a lot of people lately I'm experimenting with IoT and Home Automation. There are a lot of interesting projects going on, also a lot here at Instructables. But a thing that i run against is the fact of IoT Gateway/server software. On Google I found differed IoT gateways/servers that I wanted to share with you guys. If you have to contribute to my list, please do. All software's have there pros and cons, so more project the better.  - Thingspeak. This is a in the cloud site to witch you can send your sensor data and switch things - Exosite. Pretty similar to Thingspeak - IFTTT. This also a cloud site, with witch you can have your sensor data communicate with other services on the web like google, facebook, twitter - Openhab. Is a open home automation software that runs on the Raspberry Pi, it also has a android app. Unfortunately not that easy to configure. - EasyIoT. Is a pretty new server application, that looks great on the web and phone browser. Still new and in development.  Like I said all projects are have there pros and there cons. If somebody has to contribute to this list, please do. 

Topic by mfaber1    |  last reply