1
0
Fork 0
mirror of https://github.com/icewind1991/mhz19-rs synced 2026-06-03 09:34:12 +02:00
Accessing MH-Z19 CO₂ sensor over serial bus using rust
Find a file
2019-09-05 19:42:06 +02:00
src dont test doc comments 2019-09-05 19:42:06 +02:00
.gitignore init repo 2019-09-05 16:24:58 +02:00
Cargo.toml add description and licence 2019-09-05 19:39:53 +02:00
LICENSE-APACHE add description and licence 2019-09-05 19:39:53 +02:00
LICENSE-MIT add description and licence 2019-09-05 19:39:53 +02:00
README.md dont test doc comments 2019-09-05 19:42:06 +02:00

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());
}