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 following diagram:

4 Add new device

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

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;

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;

Pin: V0 in this example;

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:http://osoyoo.com/driver/cayenne_dht11.txt

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 authentication token, 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 Temperature DHT11 sensor widget will be displayed on your dashboard.

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

Add new…->Device/Widget

Choose: Sensors->Generic

Choose “Digital Input”

The datasheet will be shown as followed:

Widgit Name: Change the name as Humidity;

Select Device: choose Arduino Uno;

Connectivity:Select Virtual;

Pin: choose V1 pin

Choose Widget: Choose “2 state”;

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…….

Here we can read the temperature is 78, and the humidility is 61.  You can read the real-time data from your smart phone remotely.

Leave a Reply

WordPress spam blocked by CleanTalk.
Bombax Theme designed by itx