i2cdevlib icon indicating copy to clipboard operation
i2cdevlib copied to clipboard

Communication problems using MPR121

Open mhusinsky opened this issue 4 years ago • 2 comments

hey there,

when trying to use an MPR121 (using the Adafruit Breakout Board) i failed using the code provided. after some hours of debugging and comparing the code with the library provided by adafruit i found out that the culprit is the way I2C data is requested in I2Cdev.cpp

Changing this line: https://github.com/jrowberg/i2cdevlib/blob/c08960d03ab36ef0cb07c618926bf9553d78157a/Arduino/I2Cdev/I2Cdev.cpp#L236

to

Wire.endTransmission(false);

makes it work though.

i'm not sure if this change has implications for other devices but it is necessary to make the MPR121 work.

mhusinsky avatar Mar 08 '20 15:03 mhusinsky

i forgot to mention that this happend to me on an ESP32 based board

mhusinsky avatar Mar 08 '20 18:03 mhusinsky

Can you share your code here ? As the same setup is working for me for ESP32

AshwiniCDAC avatar Feb 03 '21 09:02 AshwiniCDAC