Uses old Rust 2015
|Oct 11, 2018
#1141 in Math
A library for the MPU-9250 9-axis IMU. Only supports the i2c interface (no SPI). Includes a minimal interface to the onboard Digital Motion Processor.
- Adjustable full scale range (2G..16G) and low-pass-filter bandwidth.
- Adjustable sample rate.
- Adjustable fifo population rate.
- Setup of DMP interrupt and fifo.
- Quaternion output from the DMP.
Note: Heading Estimation
Because the quaternions are computed from a 6-axis measurement (accelerometer and gyroscope, no magnetometer), it suffers from significant yaw drift. If you require accurate heading, it's best to ignore the quaternion output and instead use a separate 9-axis filter such as Madgwick.
Note: Crate Quality
This crate was built to do performance testing on the MPU-9250 after which usage of this crate was halted. The code isn't under active development and hasn't been cleaned up. Because there are few examples of using the DMP out there I thought it would still be valuable to share this with others.
-h to see parameters
for i2c, sample rate, and interrupt pin.
By default, uses i2c
addr=0x68, and expects a
0x71. To override, use these environment variables:
MPU9250_I2C_BUS=1 MPU9250_I2C_ADDR=104 MPU9250_WHOAMI=115 cargo test
There are no plans to do these.
- Expose temperature readings in
- DMP configurations such as orientation and tap detection.