You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a method to set SDA and SCL pins for Wire to use in this library? I have a custom PCB and need to set the SDA and SCL pins to use on an ESP32.
The text was updated successfully, but these errors were encountered:
The default instance uses the Wire instance of the TwoWire class. The TwoWire class is defined in the platform bundled Wire library (this one when using an ESP32 board).
So if you want to use an I2C interface other than the one provided by the Wire object then you can pass the TwoWire class object of the interface you do want to use to the library constructor.
You could instantiate another LSM6DS3Class object:
LSM6DS3Class MyCustomIMU(Wire1, LSM6DS3_ADDRESS);
(in this example, I am arbitrarily using the Wire1TwoWire class object)
But it might be more efficient to reuse the existing instance created by the library:
Is there a method to set SDA and SCL pins for Wire to use in this library?
No. This functionality would come from the Wire library. The Arduino_LSM6DS3 simply uses the standard interface of the Wire library for communication over the I2C bus to the LSM6DS3 chip.
So you should study the documentation for the ESP32 Wire library to learn what options you have for configuring the I2C interface:
Is there a method to set SDA and SCL pins for Wire to use in this library? I have a custom PCB and need to set the SDA and SCL pins to use on an ESP32.
The text was updated successfully, but these errors were encountered: