This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Read data from IMU sensors

Connect to IMU sensors to read real-time accelerometer, gyroscope, and magnetometer data.

System Objects

mpu9250Connect to MPU-9250 sensor on Arduino hardware I2C bus
lsm9ds1Connect to LSM9DS1 sensor on Arduino hardware I2C bus
mpu6050Connect to MPU-6050 sensor on Arduino hardware I2C bus


flushFlush the host buffer
infoRead output data rate and bandwidth setting of sensor
readRead acceleration, angular velocity, magnetic field, time, and overrun data
readAccelerationRead one sample of acceleration from sensor
readAngularVelocityRead one sample of angular velocity from sensor
readMagneticFieldRead one sample of magnetic field from sensor
releaseRelease the IMU object



Limitations when using IMU sensors


Troubleshooting Sensors

Troubleshoot IMU sensors

Featured Examples