Skip to main content

DEPRECATED LIBRARY Adafruit Python DHT Sensor Library

his library has been deprecated! We are leaving this up for historical and research purposes but archiving the repository.

We are now only supporting the use of our CircuitPython libraries for use with Python.

Check out this guide for info on using DHT sensors with the CircuitPython library: https://learn.adafruit.com/dht-humidity-sensing-on-raspberry-pi-with-gdocs-logging/python-setup


Python library to read the DHT series of humidity and temperature sensors on a Raspberry Pi or Beaglebone Black.

Designed specifically to work with the Adafruit DHT series sensors ----> https://www.adafruit.com/products/385

Currently the library is tested with Python 2.6, 2.7, 3.3 and 3.4. It should work with Python greater than 3.4, too.

Installing

Dependencies

For all platforms (Raspberry Pi and Beaglebone Black) make sure your system is able to compile and download Python extensions with pip:

On Raspbian or Beaglebone Black's Debian/Ubuntu image you can ensure your system is ready by running one or two of the following sets of commands:

Python 2:

sudo apt-get update
sudo apt-get install python-pip
sudo python -m pip install --upgrade pip setuptools wheel

Python 3:

sudo apt-get update
sudo apt-get install python3-pip
sudo python3 -m pip install --upgrade pip setuptools wheel

Install with pip

Use pip to install from PyPI.

Python 2:

sudo pip install Adafruit_DHT

Python 3:

sudo pip3 install Adafruit_DHT

Compile and install from the repository

First download the library source code from the GitHub releases page, unzipping the archive, and execute:

Python 2:

cd Adafruit_Python_DHT
sudo python setup.py install

Python 3:

cd Adafruit_Python_DHT
sudo python3 setup.py install

You may also git clone the repository if you want to test an unreleased version:

git clone https://github.com/adafruit/Adafruit_Python_DHT.git

Usage

See example of usage in the examples folder.

Author

Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit!

Written by Tony DiCola for Adafruit Industries.

MIT license, all text above must be included in any redistribution

Release files for Adafruit-DHT-Fixed 1.4.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Adafruit-DHT-Fixed 1.4.2
File Size Uploaded
Adafruit_DHT_Fixed-1.4.2.tar.gz 16.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for Adafruit-DHT-Fixed 1.4.2
File Interpreter ABI Platform
Adafruit_DHT_Fixed-1.4.2-py3-none-any.whl Python 3 none any Details

Total release size: 30.3 kB

Release files / Adafruit_DHT_Fixed-1.4.2.tar.gz

Download URL Adafruit_DHT_Fixed-1.4.2.tar.gz
Size 16.2 kB
Tags Source
SHA-256 checksum
How to use checksums
67ac6a34ab63d81bbc0e6ea09456238aaad1d65acb1a78743ce5140dc493d847
BLAKE2b-256 checksum
How to use checksums
a4acc6121b55534b11004dd6dacaa9e5a239c76d912e6d041199d2feadeb43a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

Release files / Adafruit_DHT_Fixed-1.4.2-py3-none-any.whl

Download URL Adafruit_DHT_Fixed-1.4.2-py3-none-any.whl
Size 14.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d52d1b21355f04b27a993286f225855551f55b0deacb09acd3352a3005a5a707
BLAKE2b-256 checksum
How to use checksums
6d38f4596f65f78fd7db0873460490069cc777b9993d1fee320829dd8eb6f0df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

Release history Release notifications | RSS feed

This release

1.4.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page