DHT11 temperature and humidity on an Uno R3
3 parts
A DHT11 on an Uno R3 is read every two seconds: the simulation shows its humidity and temperature in the serial monitor. Set it to 30 °C: the second reading after shows it. A read returns the measurement before it, as the DHT11's sheet says. At its settings, 55 %RH and 23 °C, each line reads 55 % and 23.0 C. Each read starts with the board pulling D2 low for 20 ms; the sensor answers with forty bits, each a high pulse of 24 µs for a 0 or 71 µs for a 1. D2 has the 4.7 kΩ pull-up to 5V that the DHT11's sheet recommends.
- U1 Uno R3, uno_dht11.ino.hex
- DHT1 DHT11 / DHT22
- R1 Resistor, 4.7kΩ