Crates.io | mpu9250-dmp |
lib.rs | mpu9250-dmp |
version | 1.0.0 |
source | src |
created_at | 2018-10-11 19:26:05.358613 |
updated_at | 2018-10-11 19:26:05.358613 |
description | Library for the MPU-9250 IMU and Digital Motion Processor. |
homepage | |
repository | https://github.com/braincore/mpu9250-dmp-rs |
max_upload_size | |
id | 89323 |
size | 69,183 |
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.
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.
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.
See examples/scan.rs
and examples/scan_dmp.rs
. Use -h
to see parameters
for i2c, sample rate, and interrupt pin.
By default, uses i2c bus=1
and addr=0x68
, and expects a WHOAMI
register
value of 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.
Mpu9250Sample
.