# micropython_ahtx0 **Repository Path**: CHN_ZC/micropython_ahtx0 ## Basic Information - **Project Name**: micropython_ahtx0 - **Description**: micropython_ahtx0 aht10 aht20 micropython的库 https://github.com/targetblank/micropython_ahtx0 - **Primary Language**: Python - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 3 - **Forks**: 0 - **Created**: 2021-06-24 - **Last Updated**: 2023-09-15 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # micropython_ahtx0 MicroPython driver for the AHT10 and AHT20 temperature and humidity sensors. ## Example usage ```python 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