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: #include <Wire.h> #include <Adafruit_Sensor.h> #include <Adafruit_BNO055.h> #include <utility/imumaths.h> Adafruit_BNO055 bno = Adafruit_BNO055(55); void setup(void) { Serial.begin(9600); Serial.println("Orientation Sensor Test"); Serial.println(""); /* Initialise the sensor */ if(!bno.begin()) { /* There was a problem detecting the BNO055 ... check your connections */ Serial.print("Ooops, no BNO055 detected ... Check your wiring or I2C ADDR!"); while(1); } delay(1000); bno.setExtCrystalUse(true); } void loop(void) { /* Get a new sensor event */ sensors_event_t event; bno.getEvent(&event); /* Display the floating point data */ Serial.print("X: "); Serial.print(event.orientation.x, 4); Serial.print("\tY: "); Serial.print(event.orientation.y, 4); Serial.print("\tZ: "); Serial.print(event.orientation.z, 4); Serial.println(""); delay(100); } 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?
... View more