mpu6050
no_std driver for the MPU6050 6-axis IMU
To use this driver you must provide a concrete embedded_hal
implementation. Here's a
linux_embedded_hal
example
```rust
use mpu6050::*;
use linuxembeddedhal::{I2cdev, Delay};
use i2cdev::linux::LinuxI2CError;
fn main() -> Result<(), Mpu6050Error
let mut delay = Delay; let mut mpu = Mpu6050::new(i2c);
mpu.init(&mut delay)?;
loop { // get roll and pitch estimate let acc = mpu.getaccangles()?; println!("r/p: {:?}", acc);
// get temp
let temp = mpu.get_temp()?;
println!("temp: {:?}c", temp);
// get gyro data, scaled with sensitivity
let gyro = mpu.get_gyro()?;
println!("gyro: {:?}", gyro);
// get accelerometer data, scaled with sensitivity
let acc = mpu.get_acc()?;
println!("acc: {:?}", acc);
} } ```