Exercise 4: The DHT11 Temperature and Humidity Sensor
Introduction
The DHT11 is a digital temperature and humidity sensor featuring his own proprietary communication protocol. It uses a single GPIO line (GPIO 16) to serially transfer its temperature and humidity measurement.
MicroPython already has a driver for the DHT type sensors (DHT11 and DHT22) included in its binary making it very easy to read the temperature and humidity values. The driver however hides the protocol from the user and the student cannot see what is going on behind the scene.
For this reason I have added a second driver allowing to read raw bit values as they appear in the DHT11 protocol. This allows the student to understand how the DHT11 actually works and what the driver is doing to extract the temperature and humidity values.
Here is the DHT11 data sheet:
https://afnog.iotworkshop.africa/pub/IoT_Course_English/TheDHT11TemperatureAndHumiditySensor/DHT11.pdf
--
Uli Raich - 2020-05-06
Comments