Template: DHT11 Temperature-Humidity Sensor Arduino Guide

From Waveshare Wiki
Jump to: navigation, search

The Arduino example is written for the Arduino UNO. If you want to connect it to other Arduino boards, you may need to change the connection.

Use with Arduino

Hardware connection

Sensor Arduino Description
VCC 5V Power input
GMD GND Power ground
DOUT D2 Digital data output
DHT11 Line 2.png

Examples

  • Download the demo codes to your PC and unzip.
  • Install the Arduino IDE on your PC.
  • Go into Temperature-Humidity-Sensor-code/Arduino/Temperature_Humidity_Sensor.
  • Run the Temperature_Humidity_Sensor.ino file.
  • Select the correct Board and the Port.
MQ5 Arduino 1.jpg
  • Build the project and upload it to the board.
  • Open the serial monitor of the Arduino IDE or the SSCOM software and check the serial data.
DHT11 Arduino 3.png