DHT11 with Arduino

Wheather monitoring with Arduino

Hello, this is my first blog.in my first blog i will explain you to build wheather monitoring system with arduino.

Hardware components required :-

  1. Arduino Uno
  2. DHT11 Humidity and Temperature Sensor
  3. Connecting Wires

Software required:-

  1. Arduino IDE

Connect the DHT11 Humidity and Temperature Sensor with arduino

Arduino -> DHT11

Vcc       ->      5v

GND     ->    GND

2 Pin     ->    2nd pin of DHT11

Download DHT11 Library :-
https://github.com/markruys/arduino-DHT

After Download DHT11 Library add library in Arduino IDE

Go to Sketch menu -> Include Library -> Add Zip File of DHT11 library

write code into Arduino IDE and upload into Arduino board

 

#include "DHT.h"  /* include dht11 library */

DHT dht;

void setup()
{
  Serial.begin(9600);
  Serial.println();
  Serial.println("Status\tHumidity (%)\tTemperature (C)\t(F)");

  dht.setup(2); 	/* set pin for data communication */
}

void loop()
{
  delay(dht.getMinimumSamplingPeriod());	/* Delay of amount equal to sampling period */	

  float humidity = dht.getHumidity();	    /* Get humidity value */
  float temperature = dht.getTemperature();	/* Get temperature value */

  Serial.print(dht.getStatusString());	    /* Print status of communication */
  Serial.print("\t");
  Serial.print(humidity, 1);
  Serial.print("\t\t");
  Serial.print(temperature, 1);
  Serial.print("\t\t");
  Serial.println(dht.toFahrenheit(temperature), 1);	/* Convert temperature to Fahrenheit units */
}

Datasheet of DHT11 sensor :- https://akizukidenshi.com/download/ds/aosong/DHT11.pdf

Demonstration Video

Post Created 7

2 thoughts on “Wheather monitoring with Arduino

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts

Begin typing your search above and press enter to search. Press ESC to cancel.

Back To Top