Skip to main content

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.


Only smbus2 other than Python.


pip3 install sht20




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))


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.



Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for sht20, version 0.1.2
Filename, size File type Python version Upload date Hashes
Filename, size sht20-0.1.2-py3-none-any.whl (4.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size sht20-0.1.2.tar.gz (2.9 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page