diff --git a/src/main.rs b/src/main.rs index 355f9cd..ac85871 100644 --- a/src/main.rs +++ b/src/main.rs @@ -32,7 +32,7 @@ async fn main(_spawner: Spawner) { loop { unwrap!(twi.blocking_write(ADDRESS, &mut [0xFD])); - Timer::after_millis(300).await; + Timer::after_millis(10).await; let mut buf = [0u8; 6]; unwrap!(twi.blocking_read(ADDRESS, &mut buf)); @@ -42,10 +42,9 @@ async fn main(_spawner: Spawner) { let rh_int = u16::from_be_bytes([buf[3], buf[4]]); let rh_float: f32 = -6f32 + 125f32 * (rh_int as f32 / (2u32.pow(16) - 1) as f32); - println!("temp_float: {}", temp_float); - println!("rh_float: {}", rh_float); + println!("{}\t{}", temp_float, rh_float); - Timer::after_millis(1000).await; + Timer::after_millis(50).await; } }