Skip to content

TwoWire object can now be passed to the constructor

Compare
Choose a tag to compare
@wollewald wollewald released this 16 May 13:41
· 99 commits to main since this release
886887a

There are now several ways to create your ADXL345 object:

  • ADXL345_WE myAcc = ADXL345_WE() -> uses Wire / I2C Address = 0x53
  • ADXL345_WE myAcc = ADXL345_WE(ADXL345_I2CADDR) -> uses Wire / ADXL345_I2CADDR
  • ADXL345_WE myAcc = ADXL345_WE(&wire2) -> uses the TwoWire object wire2 / ADXL345_I2CADDR
  • ADXL345_WE myAcc = ADXL345_WE(&wire2, ADXL345_I2CADDR) -> all together

So now you are able to use the two I2C busses of ESP32 boards.