Closed DrKlipper closed 5 months ago
Oh just saw this is the wrong repo. But anyway ... The error is the same. Can´t get your code working with your provided example ... Will also post this in the smbus2 repo.
Hi @DrKlipper! Indeed this repo is only for the AHT20, and as I don't own a AHT25 I won't be able to help you there. If your i2c commands work, I guess it means that something is probably wrong on your python script, not on the physical side of things (resistors). I'll close this issue for now, but feel free to fork this repo and develop a script for the AHT25!
Hi !
I try to write some python code for reading the AHT25 sensor. The sensor is nothing special - only a humidity / temp sensor.
It´s connected to the Pi 4 directly with 15cm of wire cable to the I2C port of the Pi (Pin 3, 5).
If I use i2cdetect I can see the sensor:
Using i2ctransfer works also with no problems:
And if I decode the resulting bytes I get plausible readings. I even can see that the temp rises when I touch the sensor.
Now I tried to read the sensor with your python lib but without any luck ... I always got errors like this:
Sometime I see Error 5, too (Input Output error)
I tried pullups with 2k2, 4k7 and 10k. But nothing seems to help.
Do you have any idea what can cause this errors? It´s frustrating ... All other sensors I try work like a charm. But this sensor drives me crazy :-)
Hope on any hint.
Dominik