Multiple BNO085 with Sparkfun Library

Hi there!

I’m trying to use Sparkfun’s BNO08x library with a couple of BNO085 boards but It only recognizes the first one I initialize and not the second one. Is it posible to use this library with multiple devices?

This is what I’m implementing now:

#define BNO08X_ADDR_A 0x4B // SparkFun BNO08x Breakout (Qwiic) defaults to 0x4B

#define BNO08X_ADDR_B 0x4A // Alternate address if ADR jumper is closed

BNO08x myIMU_A;

BNO08x myIMU_B;

myIMU_A.begin(BNO08X_ADDR_A, Wire, BNO08X_INT, BNO08X_RST);

myIMU_B.begin(BNO08X_ADDR_B, Wire, BNO08X_INT, BNO08X_RST);

Any input would be appreciated.

Which BNO085 are you using?

i’m using Adafruits BN085 breakout. It’s the only one I could source locally.

Did you pull DI high on the second board? In I2C mode, that pin changes the address

Yes, and there are both definitely with the two different addresses. If I change the initialization order I can talk to the other one but it’s always the first one.

I simplified the code in th first post a bit, I check for the initialization and if it failed I locked up the code in a while(1), just as the library example does. The first device goes through the initialization ok (regardless the address) and the second one gets locked up.