DHT11 With Arduino

by sfeelectronics in Circuits > Arduino

15965 Views, 6 Favorites, 0 Comments

DHT11 With Arduino

0.jpeg

DHT11 is a sensor capable of detecting moisture and ambient air temperature with digital calibration of output. Level of accuracy for humidity of approximately 5% RH and the accuracy of the temperature is approximately 2'C. DHT11 uses a Single-Wire Two-Way communication line, which is one pin that is used for 2 pieces of communication in turn.

Here is the tutorial of DHT11 with Arduino.

Material You Needs

You will need:

  1. DHT11 Sensor Module
  2. Arduino Uno R3
  3. Jumper Wires

Pin Out

1.jpeg

  1. - DHT11 --> GND Arduino
  2. out DHT11 --> A0 Arduino
  3. + DHT11 --> +5V Arduino

You can download the library of DHT11 Sensor Module in this link.

Code

2.png

#include<dht.h>

dht DHT11;

#define DHT11_PIN A0

void setup() {

Serial.begin(9600);

Serial.println("DHT11 SFE Electronics");

}

void loop() {

int chk = DHT11.read11(DHT11_PIN);

Serial.print(" Humidity " );

Serial.print(DHT11.humidity, 1);

Serial.print(" ");

Serial.print(" Temparature ");

Serial.println(DHT11.temperature, 1);

delay(2000);

}

Check the Result

3.jpeg