Snapshot.

This commit is contained in:
mattbk
2026-09-08 22:40:05 -05:00
parent d6d488b4b0
commit ccf554c8a4
3 changed files with 14 additions and 1 deletions
+6 -1
View File
@@ -5,6 +5,7 @@ use std::io::ErrorKind;
use std::io::Write;
use std::thread::sleep;
use std::time::Duration;
use core::iter::repeat;
fn get_smeter(comport: &str) -> String {
let mut port = serialport::new(comport, 4800)
@@ -58,6 +59,10 @@ fn main() {
// Simple test loop to make sure we are getting values each time
for _i in 1..101 {
let a = get_smeter(port);
println!("{a}");
//println!("{a}");
match a.parse::<i32>() {
Ok(n) => println!("{} {}", a, "#".repeat(n.try_into().unwrap())),
Err(e) => todo!(),
}
}
}