adafruit_dhtlib
¶
CircuitPython support for the DHT11 and DHT22 temperature and humidity devices.
- Author(s): Mike McWethy
Hardware:
- Adafruit DHT22 temperature-humidity sensor + extras (Product ID: 385)
- Adafruit DHT11 basic temperature-humidity sensor + extras (Product ID: 386)
Software and Dependencies:
- Adafruit CircuitPython firmware for the supported boards: https://circuitpython.org/downloads
-
class
adafruit_dht.
DHT11
(pin, use_pulseio=True)[source]¶ Support for DHT11 device.
Parameters: pin (Pin) – digital pin used for communication
-
class
adafruit_dht.
DHT22
(pin, use_pulseio=True)[source]¶ Support for DHT22 device.
Parameters: pin (Pin) – digital pin used for communication
-
class
adafruit_dht.
DHTBase
(dht11, pin, trig_wait, use_pulseio)[source]¶ base support for DHT11 and DHT22 devices
-
humidity
¶ humidity current reading. It makes sure a reading is available
Raises RuntimeError exception for checksum failure and for insufficient data returned from the device (try again)
-
measure
()[source]¶ measure runs the communications to the DHT11/22 type device. if successful, the class properties temperature and humidity will return the reading returned from the device.
Raises RuntimeError exception for checksum failure and for insufficient data returned from the device (try again)
-
temperature
¶ temperature current reading. It makes sure a reading is available
Raises RuntimeError exception for checksum failure and for insufficient data returned from the device (try again)
-