Authorized Online Retailers:

AMAZON
AMAZON-jp
amzuk

1 Overview

In this lesson, we’ll show how read temperature and humidity data from DHT11 on Cayenne IOT data sheet.

2 Hardware preparation

Parts Qauntity
Arduino UNO 1
Ethernet shield W5100 1
USB cable 1
DHT11 1
200 ohm Resistor 1
Jumper wires several
Breard board 1

3 Hardware connecion

Connet the DHT11 temperature with UNO board as below :

Arduino+W5100 DHT11
5V VCC
GND GND
D5 DATA

 

4 Add new device

Login Cayenne platfrom,Add new…->Device/Widget

Select your method of connectivity: There are Digital、Analog、Virtual, in this example we use Virtual

Choose: Sensors->Generic

Choose “Digital Input”

The datasheet will be shown as followed:

Widgit Name: Give your actuator a name, the default name is Digital Input,in this example we change the name as Temperature;We writed DHT-T on now;

Select Device: Select your Arduino device, the one used in this example is the Arduino Uno;

Connectivity:Select your method of connectivity: There are Digital、Analog、Virtual, in this example we use Virtual;

Channel:  3

Choose Widget: Choose "2 state";

Click”Step 1:Sketch File”, the sample sketch will be displayed, in this sketch we need to creat a new sketch, click “Done”

Download the sketch file and copy into Arduino IDE, and upload to arduino UNO:DHT11 sketch ,you can download the code here.

The DHT Library is required to run this sketch. If you have not already done so you need to download and install it from http://osoyoo.com/driver/DHT.zip

Please remember to use your own authentication info, choose the Board type Arduino Uno and correct Port, upload the sketch to your Uno board. In the Cayenne dashboard, you can click “Step 2: Add Sensor”, then the DHT11-T sensor widget will be displayed on your dashboard.

As DHT11 can detect temperature and humidity,  please follow the next steps to add another Humidity widget for DHT11.

Widgit Name: DHT-H;

Select Device: choose Arduino Uno;

Connectivity:Virtual;

Channel:  4

Then click  step 2: Add Sensor. then the Humidity widget will be displayed on your dashboard.

Further more, you can repeat the above steps to add more temperature sensors by changing the pin as V2/V3, V4/V5…….
BELOW
Here we can read the temperature is 29, and the humidility is46.  You can read the real-time data from your smart phone remotely.