DHT22 with Arduino (URGENT)

We are trying to use DHT22 with Arduino, but we are not getting the results.
Please help…

Here is the arduino code

JS code



You have used 0 and 1 as the pins for software serial. These pins are also used by hardware serial.
Since you have initiated both software serial and hardware serial on the same pins, they are interfering with each others functionality.

Changing the pins you are using for software serial should solve your problems.

Also you could simplify your coding effort by using the BoltIoT-Ardino-Helper library.
Check it out here

The code is working. Now we want to connect additional sensors like proximity and alcohol in the same way. What we want to achieve is: Connect three sensors with BOLT using Arduino. This is for an upcoming college project.
Please give your valuable suggestions.

Hi @ansari.raza05,
You can go ahead and connect the sensors to the Bolt. Make sure that the sensors that you are planning to use are compatible with Bolt. Bolt can supports sensors which give a TTL type of output, or an analog output bounded by 0 and 1 volts, i.e. a 0 or 1 (0v or 3.3v).
You can make use of the API calls to poll the Bolt for the sensor values and take action accordingly.

Btw, what is the aim of your project?

Thanks shoeb,
Brother I think that you misunderstood my query. The sensors are working fine when we connect it directly through BOLT, the problem arises when we try to connect it through arduino.
We used Arduino because, we had to separate the temperature and humidity data from DHT22, which was not happening with BOLT. Then we decided to connect the other sensors also with Arduino which are Alcohol sensor(MQ3) and Proximity sensor.
**PROBLEM:**We wish to use a single Arduino program (which is shown in the pic above), for the two other sensors also. Please tell what changes should be made in that program. Also post any code example if you already have it.

Hi @ansari.raza05,

Sending multiple sensor data to the cloud using Arduino is pretty easy.
You can send upto 6 data types to the cloud.

All you have to do is change the code which sends data to the bolt.
When you want to send more than one data type (Example you want to send Temperature, Humidity and a digitalPin status), all you have to do is print all 3 with commas to seperate them.
So lets say the temperature is 30 degrees, the Humidity is 40%, and the digital pin is high then you would have to pring

Then on the product on the cloud, you have to configure the product hardware to monitor 3 CSV (Comma Separated Values) and give a variable name to each one of them.

The cloud side code will separate the sting into its individual components, and you will be able to plot each one of them separately.

You can use the multigraph feature to visualise all of them simultaniously