Python3 I2C Driver & Application for SHT20 Temperature & Humidity Sensor
Project description
SHT20 Temperature & Humidity Sensor Driver for Python3
SHT20 is a Temperature & Humidity sensor manufactured by Sensirion. With this driver, you can use SHT20 with Python3 over I2C.
Dependencies
Only smbus2 other than Python.
Installation
pip3 install sht20
Usage
run-sht20
or
from sht20 import SHT20
from time import sleep
sht = SHT20(1, resolution=SHT20.TEMP_RES_14bit)
temp = sht.read_temp()
humid = sht.read_humid()
# or
data = sht.read_all()
temp = data[0]
humid = data[1]
print("Temperature (°C): " + str(temp))
print("Humidity (%RH): " + str(humid))
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sht20-0.1.4.tar.gz
(3.0 kB
view details)
Built Distribution
sht20-0.1.4-py3-none-any.whl
(4.2 kB
view details)
File details
Details for the file sht20-0.1.4.tar.gz
.
File metadata
- Download URL: sht20-0.1.4.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.7.0 requests/2.22.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.5.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72a1e547894f95696a788fb7b0056275cd2e79ee76db865ed7aeb4ea60a817b7 |
|
MD5 | 27f359b395da335bbef2777d129e944a |
|
BLAKE2b-256 | ceb2303c90f1534ed831739763ee04a1024de39a87ca33cbffcd9e1ad39cdfea |
File details
Details for the file sht20-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: sht20-0.1.4-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.7.0 requests/2.22.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.5.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f0dcc5be13bec40a2a226287a0e6b9a9dc2385e19b7e94b379e0b07528d0e7b |
|
MD5 | 3441696ccfd3b1c9e7d1a50c9f5b3091 |
|
BLAKE2b-256 | 79c4ceb147f61e40132d716900ca1f723f653242abddf416940b305c7a0119e1 |