Skip to content

Commit 3d4a6ba

Browse files
committed
examples: linux: Add sleep between refreshes
Doing it too quickly results in: called `Result::unwrap()` on an `Err` value: I2c(I2CError { err: Errno(121) }) Signed-off-by: Daniel Schaefer <dhs@frame.work>
1 parent 2281c4d commit 3d4a6ba

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/linux.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@ fn main() {
2020
}
2121
println!();
2222
println!();
23+
2324
sensor.refresh().unwrap();
25+
thread::sleep(Duration::from_millis(100));
2426
sensor.refresh_v().unwrap();
25-
2627
thread::sleep(Duration::from_millis(100));
2728
}
2829
}

0 commit comments

Comments
 (0)