Skip to content

MicroPython driver for the AHT10 and AHT20 temperature and humindity sensors.

License

Notifications You must be signed in to change notification settings

targetblank/micropython_ahtx0

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.2

  • fixed packaging

0.1.1

  • fixed code style and typos

0.1.0

  • initial release

About

MicroPython driver for the AHT10 and AHT20 temperature and humindity sensors.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages