Crate linux_max6675
source ·Expand description
§linux_max6675
A library that helps you read from a MAX6675 over Linux SPI.
§Usage
To use this library, you’ll need to know which SPI device to select.
On Linux, you can use ls /dev -1 | grep spidev
to figure it out!
Then, you can use something like this example in your binary…
fn main() -> anyhow::Result<()> {
use linux_max6675::Max6675;
use std::time::Duration;
let mut max = Max6675::new("/dev/spidev0.0")?;
std::thread::sleep(Duration::from_secs(3));
loop {
println!("Read Celsius! Got: {}° C.", max.read_celsius()?);
std::thread::sleep(Duration::from_millis(500));
}
}
Modules§
- Connection
Structs§
- A representation of the MAX6675 thermocouple digitizer.
Enums§
- An error emitted due to problems with the MAX6675.
- A value that’s one of many common temperature units.