Authorized Online Retailers:
In this lesson, we’ll show how read temperature and humidity data from DHT11 on Cayenne IOT data sheet.
2 Hardware preparation
|Ethernet shield W5100||1|
|200 ohm Resistor||1|
3 Hardware connecion
Connet the DHT11 temperature with UNO board as below :
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 “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；
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”
The DHT Library is required to run this sketch. If you have not already done so you need to download and install it from ：https://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;
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 29, and the humidility is46. You can read the real-time data from your smart phone remotely.
DownLoad Url osoyoo.com