update example
This commit is contained in:
parent
5398f1d472
commit
6079fb4cd0
1 changed files with 5 additions and 0 deletions
|
@ -23,6 +23,11 @@ fn main() -> Result<(), Error<LinuxI2CError>> {
|
||||||
|
|
||||||
let mut mpu = Mpu6050::new(i2c, delay);
|
let mut mpu = Mpu6050::new(i2c, delay);
|
||||||
mpu.init()?;
|
mpu.init()?;
|
||||||
|
mpu.soft_calib(100)?;
|
||||||
|
mpu.calc_variance(50)?;
|
||||||
|
|
||||||
|
println!("Calibrated with bias: {:?}", mpu.get_bias().unwrap());
|
||||||
|
println!("Calculated variance: {:?}", mpu.get_variance().unwrap());
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
// get roll and pitch estimate
|
// get roll and pitch estimate
|
||||||
|
|
Loading…
Reference in a new issue