scd41-embedded
A platform-agnostic, no_std driver for the Sensirion SCD41 CO₂ / temperature / humidity sensor, built on the embedded-hal traits.
This crate provides:
- Blocking (synchronous) API using
embedded-hal1.0 (I2c+DelayNs) - Optional async I2C + delay API behind the
asyncfeature usingembedded-hal-async
Features
async: enables async I2C + delay support viaembedded-hal-async.
Blocking example
use Scd41;
# let i2c = todo!;
# let delay = todo!;
let mut scd = new;
scd.start_periodic_measurement?;
loop
# Ok::
Async example
Enable the feature:
[]
= { = "0.1", = ["async"] }
use r#Scd41Async;
# let i2c = todo!;
# let delay = todo!;
let mut scd = new;
scd.start_periodic_measurement.await?;
loop
# Ok::
License
MIT