Air Meter Making #2: Use the Arduino DHT 11 Module

Air Meter Making #2: Use the Arduino DHT 11 Module © GPL3+

Air meter making, a second time! Let's look at temperature and humidity using the DHT 11 module.

  • 3,472 views
  • 4 comments
  • 10 respects

Components and supplies

Apps and online services

About this project

I learned to use the WiFi module last time. This time we will look at the most important temperature and humidity sensors in this project.

Step 01

A dedicated library is required to use the DHT 11 module. Download the file below.

File 01 http://deneb21.tistory.com/attachment/cfile24.uf@220A6C3755DA9E322E7FED.zip

Once you have downloaded the file, load DHT 11 from the library.

If the file is successfully loaded, the following screen appears.

Step 02

Now let's look at temperature and humidity with DHT 11 module.

Once you have entered the code and clicked Upload, you can see the temperature and humidity by checking the serial monitor.

Now we know how to use the DHT 11 module!

Next time, I will work on sending the temperature and humidity data to the server using ESP-01 module and DHT 11 module learned earlier.

Until now, it was ParkMoonsu! See you next time!

Note: sites and source of the file - http://deneb21.tistory.com/

Code

DHT 11 CODEArduino
Check out the serial monitor!
#include <DHT11.h>    //Load library
int pin=2;            //Pin number of the signal
DHT11 dht11(pin);        
void setup()
{
   Serial.begin(9600); //Communication speed setting
}
 
void loop()
{
  int err;
  float temp, humi;
  if((err=dht11.read(humi, temp))==0) //Read temperature, humidity read
  {
    Serial.print("temperature:");
    Serial.print(temp);
    Serial.print(" humidity:");
    Serial.print(humi);
    Serial.println();
  }
  else                                //Processing in case of error
  {
    Serial.println();
    Serial.print("Error No :");
    Serial.print(err);
    Serial.println();    
  }
  delay(1000);                        //Repeat every second
}
 


//source: http:deneb21.tistory.com/207 [Do It Yourself!]

Schematics

DHT 11 Schematics
For a DHT 11 module with four pins, use a 5K ohm resistor.
Temperature humidity arduino chiosz1 43qbkrmopc

Comments

Similar projects you might like

Air Meter Making #3: Using Thingspeak

by 4 developers

  • 669 views
  • 0 comments
  • 1 respect

Air Meter Making #1: Use The Arduino Wi-Fi Module ESP-01

by 4 developers

  • 4,205 views
  • 1 comment
  • 11 respects

Air Meter Making #4: Complete

Project tutorial by 4 developers

  • 2,947 views
  • 1 comment
  • 8 respects

DHT11 Temperature/Humidity Sensor

Project tutorial by Zachary Haslam

  • 13,130 views
  • 1 comment
  • 30 respects

Temperature and humidity meter (iot)

Project showcase by 윤원호 and gledel

  • 5,687 views
  • 1 comment
  • 15 respects

Air Quality Check with Arduino Uno

by AMAL NS

  • 11,830 views
  • 0 comments
  • 38 respects
Add projectSign up / Login