Skip to content

MPU6050 (IMU) — Offset Calibration (mpu6050_calibrate)

What it does: Runs the calibration of zero offsets (mpu.calcOffsets(1, 1)) for more stable gyro and derived angle outputs.

mpu6050_calibrate

Inputs

  • No data inputs.

Output

  • None (statement block).

When to use it

  • After initialization and whenever the mechanical attachment of the sensor is changed.
  • When drift or permanent offset of values is suspected.

Tips and pitfalls

  • Do not move the sensor during calibration.
  • Do not perform calibration during vibrations or when the device is starting up.

Usage example

example_mpu6050

Open example in ESP IDE

Generated Python example

mpu.calcOffsets(1, 1)