Main Content

calibrateAccel

Calibrate accelerometer located inside MPU-9250 sensor

Add-On Required: This feature requires the Simulink Coder Support Package for Beaglebone Blue Hardware add-on.

Description

calibrateAccel(bbblue) calibrates the three-axis accelerometer 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.

example

Examples

collapse all

Create a connection to the BeagleBone Blue hardware. This connection reuses the IP address, user name, and password from the 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 BeagleBone Blue hardware, see beagleboneblue.

bbblue = beagleboneblue
bbblue = 

  beagleboneblue with properties:

    DeviceAddress: '172.69.7.2'
             Port: 22

Use the calibrateAccel function. The function starts an internal calibration algorithm. When calibrating, the function instructs you to hold the hardware in these six stable positions. Change the position of the hardware as and when instructed and wait for the message indicating the status of the accelerometer calibration.

Note

During calibration, ensure that the hardware is stable.

Beaglebone Blue Accelerometer Calibration

calibrateAccel(bbblue)
Hold the hardware stable and press ENTER to start the calibration. For more information, see Calibrate the Accelerometer in the MPU-9250 Sensor.


Hold the hardware with its z-axis pointing upwards and press ENTER.
Calibration of z-axis pointing upwards successful

Hold the hardware with its z-axis pointing downwards and press ENTER.
Calibration of z-axis pointing downwards successful

Hold the hardware with its x-axis pointing upwards and press ENTER.
Calibration of x-axis pointing upwards successful

Hold the hardware with its x-axis pointing downwards and press ENTER.
Calibration of x-axis pointing downwards successful

Hold the hardware with its y-axis pointing upwards and press ENTER.
Calibration of y-axis pointing upwards successful

Hold the hardware with its y-axis pointing downwards and press ENTER.
Calibration of y-axis pointing downwards successful

Accelerometer calibration successful.

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.

Version History

Introduced in R2019a