no_std driver for the MPU9250 & onboard AK8963 (accelerometer + gyroscope + magnetometer IMU)
Connections
- NCS
- SCL = SCK
- SDA = SDI = MOSI
- AD0 = SDO = MISO
Usage
Use embedded-hal implementation to get SPI, NCS, and delay, then create mpu handle
// to create sensor with mag support and default configuration:
let mut mpu = marg_default?;
// to create sensor without mag support and default configuration:
let mut mpu = imu_default?;
// to get all supported measurements:
let all = mpu.all?;
println!;
// One can also use conf module to supply configuration:
let cfg = marg.mag_scale;
let mut mpu = marg?;
More examples (for stm32) in [Proving ground] repo.