1 unstable release
0.1.0 | Sep 5, 2019 |
---|
#72 in #accessing
9KB
114 lines
MH-Z19-rs
Accessing MH-Z19 CO₂ sensor over serial bus using rust
Usage
use mhz19::MHZ19;
fn main() {
let mut mhz19 = MHZ19::open("/dev/ttyUSB0").unwrap();
println!("CO₂ readout: {} ppm", mhz19.read().unwrap());
}
Dependencies
~2MB
~44K SLoC