Interfacing Temperature and Humidity Sensor(DHT22) With BOLT IOT Platform #BuiltWithBolt

This project is made for the people who want to do work on Internet of Things (IOT) and UART communication.In this project, Arduino will read the data from DHT22 Sensor and send the Temperature and Humidity data to the BOLT(IOT Platform)through UART communication. You can show the separate graph for both Temperature and Humidity with respect to Time on BOLT Cloud.

DHT 22 Sensor: It is a digital output sensor. It is used for both Temperature and Humidity measurement. It uses capacitive humidity sensor and thermistor to measure the surrounding air and spits out a digital signal on the data pin. The operating range of Temperature is -40 to 80 Celsius and for Humidity is 0-100%RH.

Step 1: Interfacing of Arduino With DHT 22 Sensor

What Hardware you need -

1.) Arduino

2.) DHT 22 Sensor

3.) 10k Resistor

Step 2: Interfacing of Arduino With BOLT

You can check the given link below for Arduino Code in which you can interfacing of DHT22 Sensor with Arduino and BOLT-

Step 3: Upload Java Script Code on BOLT Cloud

In this step, You can upload JavaScript code to the BOLT Cloud and show the separate graph for both Temperature and Humidity with respect to the Time. The BOLT will send data in every 5 minutes on Cloud so that you can see the delay between two reading. You can change delay time according to your requirement directly on the cloud. You need to upload javaScript code for temperature and humidity separately to plot a graph between temperature and humidity with respect to time. You can check images for the javascript code for temperature and humidity.

You can check the JavaScript code for Bolt -


// It will plot line graph if you want to gauge or bar or any other graph you just need to write barGraph instead of lineGraph

<em> setAxisName('time_stamp '',temperature'); </em>

// It will set your axis name. we are plotting temperature vs time graph so our axis name is temperature

<em> plotChart('time_stamp','temp'); </em>

// the variable name which you have given while selecting GPIO in hardware configuration

<em>setAxisName('time_stamp '','humidity');</em>

// It will set your axis name. we are plotting humidity vs time graph so our axis name is humidity

<em> plotChart('time_stamp','hum');</em>

//the variable name which you have given while selecting GPIO in hardware configuration


// It will download your data from CSV format.

Step 4: Steps for Configuration on Bolt Cloud

Steps for the File upload on BOLT Cloud -

1.) Buy BOLT Unit and create a user account on BOLT Cloud.

2.) login to your account.

3.) Register your BOLT unit to your BOLT Cloud account.

4.) After registration successful, you can see your BOLT unit on your home page of BOLT Cloud and you can see Developer console option on a home page of Cloud account.

5.) Click on a Developer console and upload javascript file.

Step 5: Hardware Configuration

6.) Once your file is uploaded successfully, Locate your product in the list. Under Home Page column, select your javascript file.

Click on the hardware configuration button to configure the hardware.

7.) In the Configure Product page. A select UART option and then choose how many commas separated value you want. For eg - we want 2 value for temperature and humidity.Give a variable name to both values. A Select delay between two values for eg - 5 minutes. Click on OK. And then FINISH.

Step 6: Deploy Configuration

8.)Click on the DEVICES Tab. Your Device ID will be listed.Now, Under the product tab, Select the name of your product “Bolt IoT Product”. For eg - temp. Now, Click on the Deploy Configuration button.

Step 7: Data Visualisation

9.) Go to home page and click on BOLT unit. It will redirect to you on the new page where you can see a graph for Temperature and Humidity with respect to Time.



    • Safe and Secure Challenge

      Safe and Secure Challenge
    • Warm and Fuzzy Contest

      Warm and Fuzzy Contest
    • Faux-Real Contest

      Faux-Real Contest

    7 Discussions


    1 year ago

    Can you help me with complete bolt code


    1 year ago

    In Step-3, you have uploaded a screenshort of javascript code for Two different graphs. So , the javascript code will consist only these 4 lines code or we have to add something else in that given codes


    1 year ago

    What is the JavaScript code which you have used to send the data from Arduino UART to bolt

    2 replies

    Reply 1 year ago

    JavaScript code is for Bolt hardware. It is used to read data which we are sending through UART from Arduino and then sending the same data to the bolt cloud for data visualisation.


    1 year ago

    The Code is working absolutely fine. Add required Libraries to your Arduino code.It will work.