linux_max6675 0.1.1

A library that reads temperature data from a MAX6675 over the Linux kernel's SPI API.
//! #
//! This example works great on my Milk-V Duo!
//! It should serve as an excellent starting point for your own projects, too!

use std::time::Duration;

use linux_max6675::Max6675;

fn main() -> anyhow::Result<()> {

    tracing::info!("Hello, world!");

    // assuming your MAX6675 is found at this path
    let mut max = Max6675::new("/dev/spidev0.0")?;

    // sleep for a moment, just to let everything 'settle'

    loop {
        tracing::info!("Read Celsius! Got: {}° C.", max.read_celsius()?);

        // you might want to sleep so you don't get double readings. feel free to play with this, though!