1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
mod datagps; use core::time::Duration; use std::thread; use crate::datagps::*; fn main(){ let mut x = DataGPS::new(Bauds::Baud9600); loop { x.read_all_data(); x.print_all_value(); thread::sleep(Duration::from_millis(1000)); } }