Skip to main content

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

MIT

Release files for sht20 0.1.4

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

Source distribution (sdist)

Source distribution for sht20 0.1.4
File Size Uploaded
sht20-0.1.4.tar.gz 3.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sht20 0.1.4
File Interpreter ABI Platform
sht20-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 7.2 kB

Release files / sht20-0.1.4.tar.gz

Download URL sht20-0.1.4.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
72a1e547894f95696a788fb7b0056275cd2e79ee76db865ed7aeb4ea60a817b7
BLAKE2b-256 checksum
How to use checksums
ceb2303c90f1534ed831739763ee04a1024de39a87ca33cbffcd9e1ad39cdfea
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / sht20-0.1.4-py3-none-any.whl

Download URL sht20-0.1.4-py3-none-any.whl
Size 4.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9f0dcc5be13bec40a2a226287a0e6b9a9dc2385e19b7e94b379e0b07528d0e7b
BLAKE2b-256 checksum
How to use checksums
79c4ceb147f61e40132d716900ca1f723f653242abddf416940b305c7a0119e1
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.3

1 release file

0.1.2

2 release files

0.1.1

2 release files

0.1

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