Closed boltonja closed 11 months ago
I'm not sure what I'm doing wrong with the code formatting tool, but if anything is unclear please reach out.
I believe that this issue is a misdirecting error message bubbling up from the depths. I ran into it too (see #17 )
If you'd like, feel free to try out the modified version I made (#19) and let us know if that works to support the pull request (or not so we can fix it!)
@DemiVis thank you for mentioning PR #19. I just tested and it worked smoothly for me. I was also getting the No such device error with the current release AHTx0 1.0.20 CircuitPython library.
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Traceback (most recent call last):
File "code.py", line 15, in <module>
File "adafruit_ahtx0.py", line 96, in __init__
File "adafruit_ahtx0.py", line 120, in calibrate
File "adafruit_ahtx0.py", line 129, in status
OSError: [Errno 19] No such device
After applying PR#19 update:
Adafruit CircuitPython 8.2.9 on 2023-12-06; Adafruit QT Py ESP32-S3 no psram with ESP32S3
>>>
>>>
soft reboot
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Temperature: 20.1 C
Humidity: 45.0 %
hopefully resolved by merging https://github.com/adafruit/Adafruit_CircuitPython_AHTx0/pull/19 mpy and pypi will take a day to update!
Ordered some new AHT20 breakout boards on 26 Nov 2023. The first two of these devices (others remain sealed) fail in status with CircuitPython 8.2.9 and Adafruit CircuitPython Bundle 20231205:
Expected output is:
This is the line 129 in the library that is failing:
There are several revisions of the data sheet floating around on the internet. The one linked on the Adafruit Product site says the minimum wait time after power on is 100ms. Other documentation that I have found e.g., from Sparkfun indicate 20ms and a sample C program that I found on the manufacturer's product page waits 500ms after power-on.
I increased wait time to 110ms in a copy of adafruit_ahtx0.py, without any improvement in status reading. I also tried commenting out the self.reset() invocation in init() because the literature seems to indicate it might be unnecessary. Here is the snippet with my change:
Let me know how I can help? More context in a forum thread here