top of page
Search
Writer's pictureSahan Kariyawasam

Real-time data collection unit: ThingsInNet ESP-32 Universal IoT Dev Kit with ThingSpeak

Updated: Sep 22, 2023

Integration with ThingSpeak:


The following use case explains how ThingsInNet Sense Kit could be used to collect data related to Temperature, Humidity, Light Intensity and Pressure from the onboard sensors. Same steps and setup can be adapted to connect and collect data and make decision form various other sensors ranging from experimental to industrial applications.


Prerequisites:



ThingSpeak is a powerful IoT analytics platform that simplifies the collection, storage, analysis, and visualization of sensor data. It offers data-driven insights, supports MATLAB analytics, enables IoT integrations, and provides tools for automations and alerts. ThingSpeak's versatility and extensibility make it a popular choice for IoT projects ranging from home automation to industrial monitoring and beyond.


With ThingsInNet IoT units, seamless integration with ThingSpeak is a breeze, allowing you to effortlessly connect and transmit sensor data from ThingsInNet devices to ThingSpeak's analytics platform for comprehensive data analysis and visualization, empowering you to gain valuable insights and make informed decisions for your IoT projects. The robust compatibility between ThingsInNet IoT units and ThingSpeak ensures a smooth and efficient data flow, enabling you to leverage the powerful features of both platforms for enhanced monitoring, control, and automation capabilities in your IoT applications.


Unlock the full potential of your IoT projects with ThingsInNet IoT devices and seamlessly integrate it with ThingSpeak. Imagine, effortlessly collecting real-time data on temperature, humidity, light intensity, and pressure using the onboard sensors of the Sense Kit. But it doesn't stop there! The versatility of our kit allows you to easily adapt the code and setup to connect and gather data from a wide range of sensors, catering to diverse applications from experimental tinkering to industrial monitoring. Let your imagination run wild as you harness the power of ThingsInNet and ThingSpeak to make data-driven decisions that drive innovation and efficiency.


Let me explain how easy to collect data using ThingsInNet Sense Kit and ThingSpeak platform:


Figure1: Overall system for data collection



Step1: Setting up ThingSpeak for data collection.

  • Goto ThingSpeak and click Get Started For Free. If you already have a MathWorks account, you may login with that account. Otherwise click Create One! and follow the steps to create a new account using your e-mail address. Login to the newly created account.

  • Creating a new channel:

Click on New Channel button.



When creating your channel in ThingSpeak, you have the flexibility to customize it by providing a name and description. In this article, we will focus on publishing Temperature, Humidity, Light Intensity and Pressure data, but it's important to note that ThingSpeak allows you to enable additional fields for publishing multiple readings from different other sensors. This versatility empowers you to tailor your channel to suit your specific data collection needs and expand its capabilities as desired.

  • Fill in the following information on the New Channel form and click Save Channel button at the bottom of the form.



Then you will see the Channel Stats.

  • All the charts available on this layout can be customized by clicking the Private View tab and Chart Options buttons on each chart.



  • You can give a title to your charts, customize the background color, x and y axis, and much more on each chart.






Save the changes.

  • Goto API Keys tab and copy the Write API Key for sending data to ThingSpeak. This key must be kept confidential for security purposes. You may update the same API Key in the given Arduino program under the Channel number and API key Section.



Now you are ready to deal with our exciting Dev Kit:


Step2: Ensure DHT11, BH1750 and BMP180 modules are properly fixed on the Sense Kit.


Step3: Download the sample Arduino project code here, unzip and open it using Arduino IDE.


To install required libraries in the Arduino IDE simply navigate to Sketch > Include Library > Manage Libraries


  • Search for "ThingSpeak" in the Library Manager and install the ThingSpeak library by MathWorks.



  • Search for “BH1750” in the Library Manager and install BH1750 by Christopher Laws.


  • Search for “BMP085” in the Library Manager and install Adafruit BMP085 Library by Adafruit. It is compatible with BMP180. Do not forget to install the dependencies.


In the Arduino code:

  • Navigate to “Network SSID and Password section” and update your Wi-Fi SSID and Password.

//Network SSID and Password section

const char* ssid = "XXXXXXXXXX";// your network SSID (name)

const char* password = "XXXXXXXXXX";// your network password


  • Navigate to “Channel number and API key Section” and update your ThingSpeak channel number and Write API Key. Follow this step to locate the API Key.

//Channel number and API key Section

unsigned long myChannelNumber = 1; //Your channel number, by default 1

const char * myWriteAPIKey = " XXXXXXXXXX "; //Your write API key


You are almost done. Verify the code and Upload. During the compilation if your program encounters errors with any missing libraries, you may add those libraries through Library Manager.


You may see the data is being recorded in ThingSpeak as follows:




With ThingsInNet Dev kits you have flexibility to work with different kind of sensors ranging from experimental to industrial applications. Enjoy connecting!











Recent Posts

See All

Comments


bottom of page