etno712 / aht Goto Github PK
View Code? Open in Web Editor NEWMicroPython driver for AHT sensors (humidity and temperature)
MicroPython driver for AHT sensors (humidity and temperature)
when i try to run this code:
import time, machine
import aht
i2c = machine.I2C(1,scl=machine.Pin(22), sda=machine.Pin(21))
sensor = aht.AHT2x(i2c, crc=True)
print("Humidity: {:.2f}".format(sensor.humidity))
print("Temperature: {:.2f}".format(sensor.temperature))
I get:
Traceback (most recent call last):
File "", line 3, in
File "aht.py", line 164, in
File "aht.py", line 45, in init
File "aht.py", line 56, in is_calibrated
AttributeError: 'AHT2x' object has no attribute '__status'
Bonjour Jonathan,
First, thank you for supporting FOSS and providing this code. I am making good use of it in my projects.
As you might notice in the other issue (#1), I had some problems with IIC recently, and I was trying to see if I had the newest version of the driver.
What I found is that there are dozens of drivers, and after the time had passed, I had trouble finding this repository again.
So, I recommend that you include this github URL in the python code at the top - like you have done with the url to the manufacturer.
Thanks and Best Regards
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.