Starts an auto-calibration of the accelerometer's offset for the axis specified as argument. This procedure should be executed while the board is kept laying flat and motionless. The offset is stored in the IMU registers and can be read with getAccelerometerOffset.
CurieIMU.autoCalibrateAccelerometerOffset(int, axis, int target)
axis: the axis to calibrate. It can assume one of these values:
target: it can be 0 or 1. In particular it has to be used in this way:
The target for Z is 1 because it represents the vertical force of gravity (1g) that should be read when the board is laying flat.
Corrections, suggestions, and new documentation should be posted to the Forum.
The text of the Arduino reference is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.