I have a AHT20 sensor and had some issues to get it work
As I do not have any issues anymore to connect my Fez portal after the hub change, I did my preliminary test with it
Process is quite simple. After initialization, you need to trigger the measurement (Temp / Hum), wait 120 ms to allow the sensor to acquire the data
Then you get 7 bytes (status word + 5 bytes for temp and humidity (20 bits each) and the Crc8
With the portal, I get garbage (Temp is 15 instead of 22, humidity is fluctuating and Crc8 calculation doesn’t match. If you heat the sensor the temp goes suddenly down
I tough first I had issue with the code then with the sensor.
I tried with one sensor from Adafruit and got the same result.
Then I tried with a feather and got my results (correct RH and Temp, correct CRC. I did the test on 2 feather.
same code of course, the only difference is the port
//_aht20 = new AHT20TempHum(false, FEZFeather.I2cBus.I2c1);
_aht20 = new AHT20TempHum(false, FEZPortal.I2cBus.I2c1);
I also tried to use the second i2c on the header (pb8/pb9) with the same result.
The funny thing is if I use the logic analyser. the signal I have give me the same value as the one I read (as expected) but for the feather not. here even the clock seems to have some glitches
Could I have a portal with a defective i2c ?
note : for the next fez portal revision, it would be nice to use the mikroe socket. much better than a normal header