How to send environmental data to ThingSpeak.com

Posted by openPicus | On: Jul 20 2011


Through Flyport and the SHT71 Sensirion sensor it is possible to project a weather wireless station. In particular SHT71 allows to acquire the environmental temperature and humidity, data that will then be sent to ThingSpeak for the storage.

ThingSpeak.com is a free service offering (upon registration) multi-functional database to backup any data. Each time you create a database, you receive a “Write API Key, an access password that identifies the database.

To start, we need two API libraries (thingspeak.c and SHT.c) to import on OpenPicus IDE 2.0. The system, once programmed and started, connects to the desired WLAN and initiates the sensor. The main routine includes the acquisition of environmental data (float) through SHT71 sensor, the Flyport processes them converting the temperature in °C and humidity as a percentage, all with the unique API SHTRead (). The routine then continues with the WdataF” which takes as parameters: the write the API key, an array of float type and the number of elements of that array. The function correctly set, automatically connects Flyport to the server thingspeak.com through TCPClient.

In addition to sending a POST that accesses the database, specified by the “Write API Key, and sends the data of temperature and humidity for the storage. The data, now stored in the remote database, will be available to users through colourful graphics(downloadable from thingspeak originated) or downloaded to any device of XML-like files.

Go to openpicus.com to download simple commands to connect and send data from your Flyport to Thingspeak.com

2 Comments

  1. Does it work with just the SHT71 Sensirion sensor, because i ordered the Ds18S20 temp sensor, jst wanna find out if i can substitute the SHT71 Sensirion sensor for the DS18S20 temperature sensor. Cheers

  2. Claudio says:

    great,keep us updated and if you wanna share the code/library for the DS18S20 let us know!

Leave a comment