Seeed DHT
This is a powerful sister version of our Grove - Temperature&Humidity Sensor Pro. It has more complete and accurate performance than the basic version. The detecting range of this sensor is 5% RH - 99% RH, and -40°C - 80°C. And its accuracy reaches up to 2% RH and 0.5°C. A professional choice for applications that have relatively strict requirements.
This code is for
Dependencies
This driver depends on:
This is easy to install with the following command.
curl -sL https://github.com/Seeed-Studio/grove.py/raw/master/install.sh | sudo bash -s -
Installing from PyPI
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally from PyPI. To install for current user:
pip3 install seeed-python-dht
To install system-wide (this may be required in some cases):
sudo pip3 install seeed-python-dht
To install in a virtual environment in your current project:
mkdir project-name && cd project-name
python3 -m venv .env
source .env/bin/activate
pip3 install seeed-python-dht
Usage Notes
First, Check the corresponding gpio number of the board:
pi@raspberrypi:~/Seeed_Python_DHT $ grove_gpio
Hat Name = 'Grove Base Hat RPi'
<pin> could be one of below values in the pin column for GPIO function
And connect the device to corresponding slot
==============
pin | slot
==============
5 | D5
12 | PWM
16 | D16
18 | D18
22 | D22
24 | D24
26 | D26
Next, initialize the sersor object:
import seeed_dht
# for DHT11 the type is '11', for DHT22 the type is '22'
sensor = seeed_dht.DHT("11", 12)
Reading from the Sensor
To read from the sensor:
humi, temp = sensor.read()
print('DHT{0}, humidity {1:.1f}%, temperature {2:.1f}*'.format(sensor.dht_type, humi, temp))
Contributing
If you have any good suggestions or comments, you can send issues or PR us.
Metadata
Release files for seeed-python-dht 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| seeed-python-dht-0.0.2.tar.gz | 4.0 kB | Without provenance | Details for seeed-python-dht-0.0.2.tar.gz |
Release files / seeed-python-dht-0.0.2.tar.gz
| Download URL | seeed-python-dht-0.0.2.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2ab59bcdb1ee60b53d55c8b1e57e833603bd3fe923e4fc93165dd4aa319bfc3d
|
|
BLAKE2b-256 checksum How to use checksums |
525cc439011dfd30ee4fdbf5e6d85c4734c0542ce51cae6fb99f0e4ca1a52618
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3
|
Security for seeed-python-dht 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.