Using "Morei2CPorts" with redboards and SparkfunLIS3DH

I’m attempting to use a different i2c port with sparkfun’s lis3dh library. In the Artemis MMA8452Q example any i2c port can be used. It states in the comments that “SparkFun libraries allow any Wire port to be passed in. Other folk’s libraries may not do this.” I can’t seam to do this with the lis3dh library by sparkfun. Does this library allow this?

Hi VA3SU,

I am not sure I know which Artemis example you are looking at here but what I think the issue with the LIS3DH library is the “Wire.begin();” function is handled inside the “myIMU.begin();” function in the library. To set it to a second port, you would need to modify the [C++ File to run Wire on a different port.](SparkFun_LIS3DH_Arduino_Library/src/SparkFunLIS3DH.cpp at master · sparkfun/SparkFun_LIS3DH_Arduino_Library · GitHub)

Thanks TS-Mark. I’ll continue to use the default i2c ports until others clear the way for me.