Wish Wire on different pins

mrred128

Active Member
Licensed User
In arduino, I can initialize the wire interface with "Wire.begin(D1,D2)". I have an 8266 board with a built in OLED on a non standard I2C bus that currently can't be used with B4R.
 

Erel

Administrator
Staff member
Licensed User
You can call Wire.Initialize and then call Wire.begin with:
B4X:
RunNative("StartWire", Null)
B4X:
#if C
void StartWire(B4R::Object* o) {
Wire.begin(D1, D2);
}
#End if
 
Top