05-05-2021 10:06 AM - edited 05-05-2021 11:10 AM
Hello community,
i would like to remap my axis for the given position of my sensor. Now i looked through the datasheet, where it tells my the remap sign and stuff. But i am not sure what kind of code i need to make this happen in the Arduino IDE.
https://www.bosch-sensortec.com/media/boschsensortec/downloads/datasheets/bst-bno055-ds000.pdf (page 27)
I know i need to be in the CONFIG mode to remap the axis, this i can achieve by:
bno055_set_operation_mode(OPERATION_MODE_CONFIG);
Now i am just missing the command for the axis remapping.
If you know how to do this please let me know 🙂
Have a good day
xeonus
Solved! Go to Solution.
05-05-2021 05:58 PM
Hi,
Thanks for your inquiry.
BNO055 has its own x/y/z axes as shown on page 26 of the datasheet. Your device or product also has X/Y/Z axes that you can define. If they match which means +x=+X, +y=+Y, +z=+Z, then you can use the default values in register 0x41 and x42 on page 27 of the datasheet.
If BNO055 x/y/z axes don't match your device X/Y/Z axes, then you can figure out axis remapping based on the example table on page 27. This means that you can write new values to register 0x41 and 0x42 to do the axis remapping.
Thanks.
05-07-2021 12:01 PM
Hello, thanks for the reply!
Maybe I am missing or misunderstanding some information, but it is still not clear for me.
As you mentioned on page 26 is the default config, which is stated as: (AXIS_REMAO_CONFIG = 0x24)
Now i would like to have (page27) position 5 (=P5).
In the table below is stated: P5 = AXIS_REMAP_CONFIG 0x21 and
AXIS_REMAP_SIGN 0x01
Now can I implement that in my Code?
is it enough when i just write:
bno055_set_operation_mode(OPERATION_MODE_CONFIG);
AXIS_REMAP_CONFIG 0x21;
AXIS_REMAP_SIGN 0x01;
This code would be in the Arduino IDE (C++)
I am not sure how to implement the information of the datasheet.
Thanks for the effort!
05-07-2021 07:24 PM
Hi,
Yes, after you set BNO055 to CONFIG mode, you just need to write value of 0x21 to register AXIS_REMAP_CONFIG and value of 0x01 to register AXIS_REMAP_SIGN. Then the Euler angle output (pitch/roll/heading) from BNO055 will be with respect to your device's X/Y/Z axes.
Thanks.
05-10-2021 11:02 AM
Hey FAE_CA1,
thanks for your advice. I am not sure if I got it right.
At the moment I try this code:
bno055_set_operation_mode(OPERATION_MODE_CONFIG);
0x24;
0x05;
I tried a few different axis modification, but it does not seem to change anything.
Do you know what's the reason?
Thanks alot!