O'Reilly logo

Learning Robotics Using Python by Lentin Joseph

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required