2 AdaFruit BNO055 absolute orientation sensors attached to one Arduino UNO

Hi there forums,

I'm doing a wearable project and, one of the first things, is to connect 2 IMU's BNO055 to one arduino UNO. I know I have to implement I2C protocol to this, however I don't know how the code is gonna be since we have two IMU. I have already connected ADR of one o the IMU do 3.3V pin of the arduino board in order to change the address to 0x29. However I don't know how to do the code to differenciate this two IMU. Firstly I want to calibrate them and after I want arduino receive the coordinates that it will be send to MATLAB. Anyone can help me about the code?

Simply instantiate two objects of the sensors class.

So instead of the example's line

Adafruit_BNO055 bno = Adafruit_BNO055();

use something like

Adafruit_BNO055 bno1 = Adafruit_BNO055(1, BNO055_ADDRESS_A);
Adafruit_BNO055 bno2 = Adafruit_BNO055(2, BNO055_ADDRESS_B);

So you have one object for each sensor.

Thank you very much Pylon!

I have already done that, however, my problem is in one part of the code.

I have already done that, however, my problem is in one part of the code. This was done for just one BNO055, however how can I change it in order to be able to work with both sensors? Anyone can help?

Yes, that code is written for one sensor and I gave you the necessary information to have two objects for the two sensors. It's your job to actually adapt the code, we don't do the coding for you. You have to adapt the PC side (MATLAB) anyway and the code changes have to reflect the changes in the MATLAB code (or vice-versa).

I have never wanted that. I'm sorry if you have understood that way. I was looking for any mistake that would have escaped from me. Thank you anyway for your help, the code is now working after some changes and additions.

Hope you can help other people

Best Regards.