use std::time::Duration;
use linux_max6675::Max6675;
#[tracing::instrument]
fn main() -> anyhow::Result<()> {
tracing_subscriber::fmt()
.with_max_level(tracing::Level::DEBUG)
.init();
tracing::info!("Hello, world!");
let mut max = Max6675::new("/dev/spidev0.0")?;
std::thread::sleep(Duration::from_secs(3));
loop {
tracing::info!("Read Celsius! Got: {}° C.", max.read_celsius()?);
std::thread::sleep(Duration::from_millis(500));
}
}