Wish Wire on different pins

Discussion in 'B4R Bugs & Wishlist' started by mrred128, Dec 2, 2017.

  1. mrred128

    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.
     
  2. Erel

    Erel Administrator Staff Member Licensed User

  3. mrred128

    mrred128 Active Member Licensed User

  4. Erel

    Erel Administrator Staff Member Licensed User

    You can call Wire.Initialize and then call Wire.begin with:
    Code:
    RunNative("StartWire"Null)
    Code:
    #if C
    void StartWire(B4R::Object* o) {
    Wire.begin(D1, D2);
    }
    #End if
     
    mrred128 likes this.
Loading...