Reading the Temp & Humidity from the DHT11 connected to a Raspberry PI
Connecting the thermal module (DHT11) is quite simple. Here're the pins that I used. Module RPI GND GND (Pin 6) VCC VCC (Pin 1 - may need Pin 2 (5v) for longer distances) Data GPIO 0 (Pin 11) Overall, the way to read data from the thermal module is to pulse the data pin and then wait for 40 bits of data. The Pulse The RPi needs to pulse the data pin low for 18ms (milliseconds) and then wait for module to pulse the data signal low then high for 80us (microseconds) The Data The data is transmitted as 50us of the data line getting pulled low, followed by the line getting pulled high for ~27us (for a "0") or high for 70us (for a "1"). The 40 bits The 40 bits are made up of the following 2 x 8 bits of humidity 2 x 8 bits of temperature 8 bits of parity The humidity and temperature are made up of the first 8 bits are the whole part of the number when the second 8 bits are ...