mirror of
https://github.com/icewind1991/mhz19-rs
synced 2026-06-03 17:44:09 +02:00
basic readme
This commit is contained in:
parent
10b4eb3219
commit
a2469d84d7
1 changed files with 14 additions and 0 deletions
14
README.md
Normal file
14
README.md
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
# MH-Z19-rs
|
||||
|
||||
Accessing MH-Z19 CO₂ sensor over serial bus using rust
|
||||
|
||||
## Usage
|
||||
|
||||
```rust
|
||||
use mhz19::MHZ19;
|
||||
|
||||
fn main() {
|
||||
let mut mhz19 = MHZ19::open("/dev/ttyUSB0").unwrap();
|
||||
println("CO₂ readout: {} ppm", mhz19.read().unwrap());
|
||||
}
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue