Page 1 of 1

WIFI KIT 32 - Two I2C devices problem

Posted: Sat Sep 01, 2018 1:54 pm
by nextflight
Hello, i have a problem when use together compass HMC5883L and integrated OLED display.
Separately the devices work good, but as soon as i use "display.init();" after "Wire.begin();" for compass, both devices do not work:(
May be anybody know, how i can use i2c compass with integrated display.
Thanks!

Re: WIFI KIT 32 - Two I2C devices problem

Posted: Fri Oct 19, 2018 1:44 pm
by ThingEngineer
If you look at the pinout for the WiFi Kit 32 you'll notice that the integrated OLED is not connected to the standard I2S SDA,SCL pins of 21,22. It is connected on pins 4,15 with the reset pin on 16. Simply initialize the wire library like this:

Wire.begin(4, 15); //Wire.begin(SDA, SCL);

Re: WIFI KIT 32 - Two I2C devices problem

Posted: Sun Oct 21, 2018 3:35 pm
by jesse__
I am suddenly unable to pass the two arguments in Wire.begin() for the SDA and SCL pin. The error I get is:

no matching function for call to 'TwoWire::begin(int, int)'

Everything was working fine, until this sudden error, and I do not recall changing something in the libraries I am using (Jeff Rowberg Arduino I2CDEV and MPU6050, with the additional changes needed for it to work for an ESP32).

How to fix this?