felias-fogg / FlexWire

A Wire-alike library that can be used as a drop-in for the Wire library
https://arduino-craft-corner.de/index.php/2023/11/29/replacing-the-wire-library-sometimes/
GNU Lesser General Public License v2.1
4 stars 0 forks source link

Not working with Adafruit_PN532 driver on ESP32 #3

Open Kv603 opened 2 months ago

Kv603 commented 2 months ago

I have a two I2C devices connected to an ESP32, the cable goes from the board, to a PN532 NFC reader, then to an LCD. The sketch first enumerates the devices on the bus, then brings up the LCD and the Pn532. When compiled using the "Wire" library, all devices come up (though the PN532 is unstable, due to clock-stretching).

When I clear the Arduino-IDE compiler cache and rebuild with FlexWire, all devices are enumerated, and the LCD comes up and I can write to the LCD (so I know SDA & SCL are valid); however the PN532 does not respond.

Problem can be replicated with the Adafruit example code.

felias-fogg commented 2 months ago

Hi,

FlexWire does not support clock stretching. This may be the problem.