https://github.com/feyzikesim/sht20
SHT20 Temperature & Humidity Sensor I2C Driver for Python3
https://github.com/feyzikesim/sht20
humidity i2c python3 sensirion sht20 temperature
Last synced: 3 months ago
JSON representation
SHT20 Temperature & Humidity Sensor I2C Driver for Python3
- Host: GitHub
- URL: https://github.com/feyzikesim/sht20
- Owner: feyzikesim
- License: mit
- Created: 2019-12-22T14:45:29.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-06-30T13:30:07.000Z (almost 5 years ago)
- Last Synced: 2026-01-02T17:37:20.019Z (6 months ago)
- Topics: humidity, i2c, python3, sensirion, sht20, temperature
- Language: Python
- Homepage: https://pypi.org/project/sht20/
- Size: 8.79 KB
- Stars: 8
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
```bash
pip3 install sht20
```
## Usage
```bash
run-sht20
```
or
```python
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](https://choosealicense.com/licenses/mit/)