Calibrating the MPU 6050

MPU 6050 calibration can be done using the Energia code, which is used to display the raw values of the sensor mentioned in Chapter 6, Working with Robotic Sensors. This example is already available in Energia examples. You will get this code by navigating to File/Examples/MPU 6050/Examples/MPU 6050_raw. Load this sketch into Energia and follow the procedure given here:

  1. Place the MPU 6050 breakout board on a flat surface. We can use an inclinometer to check the inclination of the surface.
  2. Modify the current program by setting the offset to zero. We can set the offset of three axes values of gyroscope to 0 using the following function:
    ("setXGyroOffset , setYGyroOffset , setZGyroOffset"  =0)
  3. Upload the raw code to Launchpad ...

Get Learning Robotics Using Python now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.