The restore_offsets sketch from Adafruit BNO055 In some way does not make sense.

I am using an ESP32 and storing the offsets of BNO055 in its NVS (non-volatile storage).


  1. I start calibrating the sensor
  2. once they are calibrated the offsets are stored
  3. I reset my node, which then finds the calibration offsets in the NVS and restores it back to the sensor

  4. Apparently here the code goes into another while loop till the bno is again calibrated and then once again the information is stored into the NVS

My question is why?

If you store offsets of the sensor and then restore them back again into the sensor why do you need to calibrate everything again.

It is like performing a hectic task everytime and storing the offsets seeks no purpose whatsoever.


Adafruit has a FAQ for this sensor which states:

One thing to keep in mind though is that the sensor isn't necessarily 'plug and play' with loading the calibration data, in particular the magnetometer needs to be recalibrated even if the offsets are loaded. The magnetometer calibration is very dynamic so saving the values once might not really help when they're reloaded and the EMF around the sensor has changed.

For further details check out the datasheet and Bosch's info on the sensor for calibration info: https://ae-bst.resource.bosch.com/media/_tech/media/datasheets/BST_BNO055_DS000_14.pdf

  • The link isn't working – Shan-Desai Oct 12 '18 at 12:19
  • True, this is just a copy/paste from Adafruit's FAQ. – jose can u c Oct 12 '18 at 12:20
  • 1
    Datasheet link updated – jose can u c Oct 12 '18 at 12:22
  • I understand the magnetometer calibration but I tried observing the values of accel. and gyroscrope after loading the offsets. Apparently all the sensors (accel., gyro) are not calibrated at all (calib values are 0). This is to say that it is better not to store offsets at all and go through the hassle of calibration everytime the sensor is switched off. – Shan-Desai Oct 12 '18 at 12:23
  • That appears to be a completely different question/issue than what you asked initially. If you have a different question, create a new question. – jose can u c Oct 12 '18 at 12:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.