Crates.io | scd30-modbus |
lib.rs | scd30-modbus |
version | 0.3.0 |
source | src |
created_at | 2022-10-04 14:23:51.580221 |
updated_at | 2024-02-12 15:42:10.153521 |
description | SCD30 driver implementation |
homepage | |
repository | https://github.com/teamplayer3/scd30-modbus-rs.git |
max_upload_size | |
id | 679842 |
size | 31,782 |
Implementation of an SCD30 sensor driver using the modbus protocol written in rust. This driver is written async/await style. Currently the smol runtime is supported.
For more information about the sensor here.
let serial = ...; // serial bus to use
let mut driver = Scd30::new(serial);
driver.set_measurement_interval(Duration::from_secs(15)).await.unwrap();
driver.start_measuring().await.unwrap();
let measurements = driver.read().await.unwrap().unwrap();