MPU 6050 Rust Driver
Platform agnostic driver for MPU 6050 6-axis IMU using embedded_hal.
Datasheet | Register Map Sheet
Visualization options for testing and development in viz branch
Basic usage - linux_embedded_hal example
use *;
use ;
use LinuxI2CError;
Note: this example uses API of version on local master branch. Some functions may not be available on published crate yet.
Compile linux example (Raspberry Pi 3B)
files here
Requirements:
and all dependencies in example/Cargo.toml
Rustup:
To configure the linker use example/.cargo/config
cross-compile with
TODO
- init with default settings
- init with custom settings
- device verification
- basic feature support as described here
- read gyro data
- read acc data
- software calibration
- software measurement variance estimation
- roll, pitch estimation accelerometer only
- read temp data
- rename constants to better match datasheet
- complementary filter for roll, pitch estimate, possible on device?
- sample rate devider with register 25? or timer/clock control with PWR_MGMT_2
- internal clock, register 108
POWER_MGMT_2, will cycle between sleep mode and waking up to take a single sample of data from active sensors at a rate determined by LP_WAKE_CTRL (page 41-43)
- internal clock, register 108
- plotting csv datafor testing? -> See viz branch