sparkfun/SparkFun_LSM9DS1_Arduino_Library

Calibration details?

glucee opened this issue · 4 comments

Can anyone provide a way to calibrate the chip ?

Thanks for your question. We have included some methods for calibrating the sensors in our Arduino Library. You can call these for an instance of the LSM9DS1 class once it's created. There are two different methods you can call:

void LSM9DS1::calibrate(bool autoCalc)
which calibrates the gyro and accelerometer and
void LSM9DS1::calibrateMag(bool loadIn)
which calibrates the magnetometer.

The argument for both methods when true will store the determined bias from the calibration to be used when a sensor is read. Below is an example of how these might be used:

LSM9DS1 imu;
void setup(){
    imu.calibrate(false);         //calibrates but does not store bias
    imu.calibrateMag(true);       //calibrates and stores bias
}

When calibration is called, should the device be stable or in motion? Is there a manual or tutorial somewhere? I could use an example of how and when to call these calibrate functions. Thanks!

Any instruction on how to calibrate ?
I cannot get good heading values ...

Did anybody manage to get this to work or found an example how to use this?