Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/targetblank/micropython_ahtx0
MicroPython driver for the AHT10 and AHT20 temperature and humidity sensors.
https://github.com/targetblank/micropython_ahtx0
Last synced: 2 months ago
JSON representation
MicroPython driver for the AHT10 and AHT20 temperature and humidity sensors.
- Host: GitHub
- URL: https://github.com/targetblank/micropython_ahtx0
- Owner: targetblank
- License: mit
- Created: 2020-12-09T07:25:26.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2023-10-12T18:09:19.000Z (over 1 year ago)
- Last Synced: 2024-11-08T00:51:53.650Z (2 months ago)
- Language: Python
- Homepage:
- Size: 8.16 MB
- Stars: 32
- Watchers: 1
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-micropython - micropython_ahtx0 - MicroPython driver for the AHT10 and AHT20 temperature and humidity sensors. (Libraries / Sensors)
README
# micropython_ahtx0
MicroPython driver for the AHT10 and AHT20 temperature and humidity sensors.
## Example usage
```python
import utime
from machine import Pin, I2Cimport ahtx0
# I2C for the Wemos D1 Mini with ESP8266
i2c = I2C(scl=Pin(5), sda=Pin(4))# Create the sensor object using I2C
sensor = ahtx0.AHT10(i2c)while True:
print("\nTemperature: %0.2f C" % sensor.temperature)
print("Humidity: %0.2f %%" % sensor.relative_humidity)
utime.sleep(5)
```## Changelog
### 0.1.2
- fixed packaging
### 0.1.1
- fixed code style and typos
### 0.1.0
- initial release