I bought the BNO055 absolute orientation board from Adafruit. I use it with Teensy 4.1 via I2C. the example I use is the standard code to get the orientation:
Adafruit_BNO055 bno = Adafruit_BNO055(55);
Serial.println("Orientation Sensor Test"); Serial.println("");
/* Initialise the sensor */
/* There was a problem detecting the BNO055 ... check your connections */
Serial.print("Ooops, no BNO055 detected ... Check your wiring or I2C ADDR!");
/* Get a new sensor event */
/* Display the floating point data */
the X, Y, Z shows valid and noise free values on the screen according to the movement of the board. There is no drift, when the board stands still, the values are constant. The problem is, the heading is losing its value upon resetting the power/ board. For example, on powering on the board and Teensy, I see X=358.5, Y=-20, Z= 5.3. I move the board a little and then I see for example, X=30.4, Y= -41.3, Z=5.5. I keep the board at this position, then I power off the devices and turn them on again. I see: X= 358.7 , Y=-41.3, Z=5.5. The heading value (X) is "0" again. The board does not retain its value. I tried to use the "restore offsets" example, and calibrate the board. The result is the same. The board was calibrated, everything shows fine except the X axis behaves the same.
What could be the problem?
The BNO055 don't have ROM inside, so there is no space to store all the parameters.
Every time sensor power reset, the algorithm inside will start from 0 for heading if there is no calibration parameter restored into.
I tried the following steps:
1. turn on the sensor
2. calibrated the sensor until the system calibration level goes to 3
3. read out the calibration parameters including offset value from BNO
4. do the power reset to sensor
5. write back all calibration parameters into BNO under configure mode
6. switch sensor in working mode
I can see the sensor can start from the previous heading value directly.
You can also try to follow these steps.