Using the new Arduino IDE for ESP8266 and found bugs, report them here

Moderator: igrr

User avatar
By unreality
#15371 I've been trying to read some data from an I2C slave, but so far I've had no luck, Wire.read() always returns 0. I've managed to use an I2C display properly before, but so far no luck reading data.

My sketch returns data fine when running on an Arduino Leonardo, but fails to return data when running on the ESP (after adding Wire.setPins()). Has anyone managed to read data from an I2C slave?
User avatar
By torntrousers
#15470
unreality wrote: Has anyone managed to read data from an I2C slave?


You're using Wire.pins(0, 2) and have SDA on gpio0 and SCL on gpio2?

I have that going but its not working terribly well. Using a MS5611 based GY63 but it often seems to give spurious readings. Can see the output here: https://data.sparkfun.com/streams/QGzadlv2DLF6387MrQOR

Seems to sometimes work for a bit, maybe when first powered up but not always then, but then mostly doesn't but sometimes does again for a few reads. Have tried pullup resistors all over the place. Bit annoying...