You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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'
The text was updated successfully, but these errors were encountered:
I saw the same error. In my case the IIC communication was not working properly. I pulled power, reconnected, and then it worked properly again. Pi Pico W, AHT21, Micropython 1.19 and also 1.20.
It might be an improvement in the code to check for proper communication over IIC and report a specific error when you can't reach the device. I suspect that would also help a lot of folks who have troubles with setting up IIC correctly.
when i try to run this code:
import time, machine
import aht
Example SCL pin and SDA pin for WEMOS D1 mini Lite
i2c = machine.I2C(1,scl=machine.Pin(22), sda=machine.Pin(21))
sensor = aht.AHT2x(i2c, crc=True)
To print one of measures:
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'
The text was updated successfully, but these errors were encountered: