calibrateMag
Calibrate magnetometer located inside MPU-9250 sensor
Syntax
Description
Examples
Calibrate the Magnetometer in the MPU-9250 Sensor
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 BeagleBone Blue hardware, see beagleboneblue
.
bbblue = beagleboneblue
bbblue = beagleboneblue with properties: DeviceAddress: '172.69.7.2' Port: 22
Use the calibrateMag
function. Hold the hardware parallel to the
ground and rotate in the air through as many orientations as possible. The function
starts an internal calibration algorithm and then returns a message indicating the
status of the magnetometer calibration.
calibrateMag(bbblue)
Press ENTER to start calibrating the magnetometer.
Rotate the Beagleboneblue board in the air through as many orientation as possible. For more information, see Calibrate the Magnetometer in the MPU-9250 Sensor.
Magnetometer calibration in progress. Continue to rotate the board in the air.
Magnetometer calibration successful.
Note
During calibration, ensure that the hardware is stable and is far away from any magnetic interference.
Input Arguments
bbblue
— Connection to BeagleBone Blue hardware
beagleboneblue
object
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
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)