MicroPython driver for the AHT10 and AHT20 temperature and humidity sensors.
Project description
micropython_ahtx0
MicroPython driver for the AHT10 and AHT20 temperature and humidity sensors.
Example usage
import utime
from machine import Pin, I2C
import 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.1
- fixed code style and typos
0.1.0
- initial release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for micropython_ahtx0-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 767830664f6badf77e252befe90ef7b529d3bc99ae413037ddf6398011fe647a |
|
MD5 | eca7e6669a33e58ce6f1122ae4d8fa03 |
|
BLAKE2b-256 | b82ef3538daf744ef27690cd33d7ad98129e828b7255237fc7a037cdd3824c6e |