Devices & Components
Arduino Uno Rev3
16x2 LCD display with I²C interface
Breadboard (generic)
Male/Female Jumper Wires
Jumper wires (generic)
DHT11 Temperature & Humidity Sensor (3 pins)
Software & Tools
Arduino Web Editor
Project description
Code
code
arduino
1#include "DHT.h" 2#define DHTPIN 2 3#define DHTTYPE DHT11 4 5DHT dht(DHTPIN, DHTTYPE); 6#include <Wire.h> 7#include <LiquidCrystal_I2C.h> 8 9LiquidCrystal_I2C lcd(0x27,16,2); 10 11 12void setup() { 13 lcd.init(); 14 lcd.backlight(); 15 16 dht.begin(); 17} 18 19void loop() { 20 21 delay(2000); 22 float h = dht.readHumidity(); 23 float t = dht.readTemperature(); 24 float f = dht.readTemperature(true); 25 float hif = dht.computeHeatIndex(f, h); 26 float hic = dht.computeHeatIndex(t, h, false); 27 28 lcd.setCursor(0,0); 29 lcd.print("H: "); 30 lcd.print(h); 31 lcd.setCursor(0,1); 32 lcd.print("T: "); 33 lcd.print(t); 34 lcd.print(" *C "); 35}
Downloadable files
this is the scheme but dht 11 is missing so read what I have written
this is the scheme but dht 11 is missing so read what I have written

operation video
operation video
this is the scheme but dht 11 is missing so read what I have written
this is the scheme but dht 11 is missing so read what I have written

operation video
operation video
Comments
Only logged in users can leave comments