WIFI KIT 32 - Two I2C devices problem

nextflight
Posts: 1
Joined: Sat Sep 01, 2018 1:45 pm

WIFI KIT 32 - Two I2C devices problem

Postby nextflight » Sat Sep 01, 2018 1:54 pm

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!

ThingEngineer
Posts: 1
Joined: Fri Oct 19, 2018 1:38 pm

Re: WIFI KIT 32 - Two I2C devices problem

Postby ThingEngineer » Fri Oct 19, 2018 1:44 pm

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);
Attachments
wifi_kit_32.jpg
wifi_kit_32.jpg (118.25 KiB) Viewed 5041 times

jesse__
Posts: 1
Joined: Sun Oct 21, 2018 3:30 pm

Re: WIFI KIT 32 - Two I2C devices problem

Postby jesse__ » Sun Oct 21, 2018 3:35 pm

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?

Who is online

Users browsing this forum: No registered users and 40 guests