
How it works
The DHT11's quirky single-wire protocol, implemented bare-metal: the AVR firmware pulls the data line (D2) low to request, then times the sensor's 40-bit reply pulse by pulse: humidity, temperature, checksum. The prints land on serial as T 023 H 045, tracking the sensor's Inspector sliders. One honest warning from the bench: this part is Arduino-only here. MicroPython's dht module imports fine but times out against the emulated part, so a MicroPython climate project should use the TMP36 on an ADC pin instead.
The DHT11 has no clock line, so every bit is a timed pulse. After the request, the sensor answers and sends each bit as a high pulse: about 27 µs means 0 and about 70 µs means 1. The firmware waits for each rising edge, samples the line 40 µs later and shifts the result into the frame. The last byte is a checksum: the low byte of the sum of the four data bytes. The Nano and the sensor share the breadboard's power rails, and one wire carries the data from the sensor to D2.
What to watch
Serial prints a new T … H … line about twice a second: the temperature in whole degrees Celsius and the relative humidity in whole percent. The default sensor settings give T 023 H 045.
What's on the bench
- Arduino Nano
- DHT11
How it's wired
- hole a4→hole B-5
- hole j4→hole B+5
- hole a30→hole B+25
- hole a32→hole B-26
- hole a5→hole c31
This project runs prebuilt firmware on the emulated board; open it in the simulator to watch it work and inspect every part live.
Try this
- Drag the temperature and humidity sliders: the serial readout follows within a beat.
- Probe D2 with the Scope and catch the 40-bit reply burst.
- Set the temperature to 0 °C or the humidity to 20 % and watch the zero-padded format hold.
- Compare with the SEN55 examples: same job, I²C instead of one bit-banged wire.



