Thingspeak allows you to easily display data, which makes it the perfect tool for begineers starting IoT (Internet of Things) projects. Above is two trends, generated by thingspeak, that displays the temperature and humidity inside my house. Heres how to do it Using a DHT22 sensor which is a low-cost digital temperature and humidity sensor and a ESP8266 (I used the NodeMCU 12E) allows you to collect weather data. Wire up the ESP8266 in the configuration below (with the data line from the sensor into pin D4) After very simple wiring you have to setup the NodeMCU to work with the Arduino IDE (click here for tutorial) and install all the libraries for the DHT22. The DHT22 sensor needs the Adafruit Sensor and DHT Sensor libraries. To check if the NodeMCU works with the Arduino IDE and the DHT22 sensor is wired up correctly run the serial.h script inside the DHT22 examples folder. This should upload and run correctly then you know you have completed the above steps correctly. Go to ThingSpeak and create an account. Go to Channels -> My Channels -> New Channels, then fill out the form as below. With every channel you make on Thing Speak it comes with a channel number and api key. There are 2 API keys, one to read data and one to write data. In the tab "API keys" copy and paste the "write" API key in the arduino code bellow and fill in your ssid and wifi password. Copy and Paste the Arduino code below into a new script in the arduino IDE and execute. Now you should have data being collected from your ESP8266 and presented in a nice graph. The best part about Thingspeak is provides the visualisation of the data in a simple graph that you can view on the website or phone. You can also embed the graphs inside webpages as I have done here. Thingspeak also has some nice features such as MatLab Analytics and Visualisation allowing you to write MatLab code to make your own plots or to manipulate and then store the data. In addition you can use the google gauge plugin to produce a nice gauge to display your data. This project gives you a small glimpse into the world of IoT and data visualisation. Its also a pretty easy project to get started :D AuthorTrent Conway - Engineering Student at Monash University
0 Comments
|
AuthorTrent Conway ArchivesCategories |