pms700x 0.1.1

Embeded-hal implementation for the PMS700x family of sensors
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use linux_embedded_hal::Serial;
use nb::block;
use pms700x::Pms700X;
use std::env::args;
use std::path::PathBuf;

fn main() {
    let port = args().skip(1).next().expect("No serial provided");
    let serial = Serial::open(&PathBuf::from(port)).unwrap();

    let mut pms = Pms700X::new(serial).into_active().unwrap();
    dbg!(block!(pms.read()).unwrap());
}