How to use DHT11 Temperature & Humidity Sensor with Arduino Uno ?

preview_player
Показать описание
How to use DHT11 Temperature & Humidity Sensor with Arduino Uno ?
#arduinoproject #arduino #temperaturesensor
#DHT11 Temperature & Humidity Sensor with #arduinoproject - Arduino Tutorial
In this tutorial we will see the interfacing of Arduino with dht11 sensor and read the humidity and temperature data on the environment...

and code given to the comment section..

#arduino
Рекомендации по теме
Комментарии
Автор

Thanks for giving such a great tutorial

Kamalsingh-hdjr
Автор

Hi,
That's great knowledge shared by you about the dht 11 it's two side work as a humidity and temperature also ..
Thanks for this tutorial

Doctor_Iotech
Автор

dht11 sensor code with arduino
/*
#include <Wire.h>
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27, 16, 2);


#include <DHT.h>
#define DHTPIN 3
#define DHTTYPE DHT11

DHT dht(DHTPIN, DHTTYPE);

void setup() {
lcd.init();
lcd.backlight();
Serial.begin(9600);
dht.begin(); // initialize the sensor
}

void loop() {
// wait a few seconds for start a measurement
delay(2000);

// read humidity data
float humidi = dht.readHumidity();
// read temperature data as Celsius
float tempC = dht.readTemperature();
// read temperature data as Fahrenheit
float tempF = dht.readTemperature(true);
// check if any reads data failed
if (isnan(humidi) || isnan(tempC) || isnan(tempF)) {
Serial.println("Failed to read from DHT sensor data!");
} else {
Serial.print("Humidity: ");
Serial.print(humidi);
Serial.print("%");

Serial.print(" | ");

Serial.print("Temperature: ");
Serial.print(tempC);
Serial.print("°C ~ ");
Serial.print(tempF);
Serial.println("°F");
lcd.setCursor(0, 0);
lcd.print("Humidity: ");
lcd.print(humidi);
lcd.print("%");
lcd.setCursor(0, 1);
lcd.print("Temp: ");
lcd.print(tempC);
lcd.print(" °C ~ ");
}
}
*/

mytechlearner
join shbcf.ru