
The Internet of Things era was much anticipated because all the manner of devices can communicate to each other. The Cloud computing creates everyday new applications to support billions of connected objects. The business trends and the consumer are moving us toward the Internet of Things! You'll ask: what about the privacy?
This DIY gives access to the ThingSpeak Services . ThingSpeak allows to draw online charts, to store and recall values and to use specific APIs to work with Twitter, or to send HTTP requests directly from the ThingSpeak servers. You can create private or public channels. Every channel can store up to 8 fields (the values) and creates charts with those fields. Every channel has a "Channel ID", a "Name", a "Write API Key" and a "Description". The Write API Key is the most important information of the channel, since it allows to upload or download the field data. The hardware used is really basic, but it could be easily upgraded with different connections, sensors, etc. Here are used 4 analog inputs with some very simple resistor-pot series to limit the input voltage above 2V, and 4 buttons with internal microcontroller pullup resistors.
The using of thingspeak services is made easy by the "Thingspeak Library". It is a ready to use library that allows to write data arrays to channels, or use the thingTWEET and thingHTTP APIs, by the calling of 4 different functions. Those functions automatically prepare the TCP message to send to thingspeak, and handle the receiving of the replies. You will use also another library: the parse lib. This helper lib provides some functions to "select" a text inside some complex string like a TCP/IP reply of a webserver. The parse lib is used to take the Temperature in °C from the reply of the thingHTTP function. The thingHTTP request stored inside thingspeak is: google.com/ig/api?weather=Roma&hl=en, and the parse is done at current_conditions parameter. In this way,
Flyport receives only data related to the "current_conditions", and the other information are not received by the module, with a high reduction of memory space needed for the GENERIC_TCP_CLIENT Rx Buffer (650 bytes are enought).
Flyport WiFi module and all the hardware based on openPICUS framework is ready to download updated weather information, upload data to cloud servers, give access to online data charting functionalities and set custom statuses of twitter account.
Ionela -
About the Author: It is quite difficult to speak about me... I am not strange, I am just not normal.