Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By Ken Shaw
#51095 So, as I have found out, the esp8266 i2c solution is purely software, so how am I supposed to enable multiple i2c buses on the esp8266? I tried this like an arduino due would enable with:
Code: Select allvoid setup() {
  Wire.begin(3,4); // join i2c bus (address optional for master)
  Wire1.begin(1,2);
  }
to no success......I've also tried this
Code: Select allvoid setup() {
  Wire.begin(3,4); // join i2c bus (address optional for master)
  Wire.begin(1,2);
  }
but that shouldn't work right? How would I address each i2c bus? Is there another software i2c library which would work for this? (using arduino ide)

Thanks in advance for the help, I've been googling around for forever and I can't find how to do this..... :(
User avatar
By Joaquin
#61436 Hello.

I define in global (sketch)
<Wire.h>
TwoWire Wire2 = TwoWire();

On setup..
Wire.begin(4,5);
Wire2.begin(12,13);

But Both wire and wire2 call wire2. (pins 12,13)

I have updated the library for esp8266 (Arduino) in which it enables global instances
The result is that both wire and wire2 call the last one defined (Wire2) :(

Can you help me ? what am I doing wrong?