Main Content

calibrateGyro

Calibrate gyroscope located inside MPU-9250 sensor

Description

example

calibrateGyro(bbblue) calibrates the three-axis gyroscope located inside the MPU-9250 sensor on the BeagleBone® Blue hardware, represented as bblue. Use this function before generating code from the MPU9250 block in DMP mode.

Examples

collapse all

Create a connection to the BeagleBone Blue hardware. This connection reuses the IP address, user name, and password from most recent connection to the BeagleBone Blue hardware. The resulting object, bbblue, represents the BeagleBone Blue hardware. For more information on creating a connection to the BeagleBoneBlue hardware, see beagleboneblue.

bbblue = beagleboneblue
bbblue = 

  beagleboneblue with properties:

    DeviceAddress: '172.69.7.2'
             Port: 22

Use the calibrateGyro function. Hold the hardware in any stable position for a few seconds. The function starts an internal calibration algorithm and then returns a message indicating the status of the calibration.

calibrateGyro(bbblue)
Hold the hardware in any stable position and press ENTER to start the calibration.

Gyroscope calibration in progress. Continue to hold the hardware in the same position for a few more seconds.

Gyroscope calibration successful.

Note

During calibration, ensure that the hardware is stable.

Input Arguments

collapse all

The object that represents the connection to the BeagleBone Blue hardware. For more information on the BeagleBone Blue object, see beagleboneblue.

Introduced in R2019a