Closed gotfredsen closed 2 years ago
Hi, im using ATMEGA328 with MiniCore and have the same problem. My solution was to simply go to AHTxx.cpp, line 91 and changed the following:
Wire.setWireTimeout(stretch, false);
with
Wire.setTimeout(stretch);
Everything works just fine.
Hi folks,
Thank you for feedback. You probably need to update Arduino AVR Core. Recently Wire.setWireTimeout() timeout API method was added to the AVR Wire library. See https://github.com/arduino/reference-en/issues/895
Hi folks,
Thank you for feedback. You probably need to update Arduino AVR Core. Recently Wire.setWireTimeout() timeout API method was added to the AVR Wire library. See arduino/reference-en#895
I am using an ESP32, not an AVR Core, and both Arduino and ESP32 board files were installed same day. Maybe the changes you are referring to has not yet been implemented for the ESP cores.
Hi gotfredsen,
You're right. For some reason, Arduino ESP32 uses Wire.setTimeout(stretch) in milliseconds, while Arduino ESP8266 uses setClockStretchLimit(uint32_t) in microseconds. I believe the timeout for the I2C bus in milliseconds is too long, so in the library I'm using microseconds.
The library has been updated. Thank you for your help.
I get this:
so I commented out the line and now it works.
My Arduino installation is brand new, with latest libraries, on a new Mac. I used to use AHT10, but this pointed me to this library, so I haven't used it before. Running on a ESP32.