ThingSpeak is an IoT platform supported by MathWorks that allows you to monitor and control IoT devices and then analyze your data with MATLAB. There is a limited free tier available for non-commercial use, and paid subscriptions available for access to advanced features or for commercial use.
This sample application will allow you to display humidity/temperature data from DHT11 sensor using your magicbit device and ThingSpeak web UI.
The application that is running on Magicbit device is written using ThingSpeak Arduino SDK which is quite simple and easy to understand.
Once you complete this sample/tutorial, you will see your sensor data on the following dashboard.
Visit the ThingSpeak official page and click on Get Started For Free to get signed up for a trial period.
After Signing in On the Left Side, you will see My Channels. Click on New Channel Button and add a new channel.
After adding a new channel, complete channel data and save it to create as follows. Add a description about the project (optional).
After creating the channel, you can see the two empty fields as below and customize the graph as your preference.
Get Api key and Channel ID as follows.
Connect your magic bit with DHT11 module as follows to pin 33.
In the Arduino IDE, install the following library for ThingSpeak.
Note: You need to edit following constants and variables in the secrets.h header file :
SECRET_SSID, SECRET_PASS, SECRET_CH_ID, SECRET_WRITE_APIKEY.
Find the header file with example arduino code in attachments; inside the Thingspeak_Magicbit.rar.
Uploading the codeFollow the steps in the image to upload the demo code to Magicbit.
In live-demo server:
If the code is uploaded correctly, As a result, you will see a time-series chart displaying latest values of “temperature” and “humidity” in 2 fields of the created channel as in below image.
Comments
Please log in or sign up to comment.