[][src]Struct scd30::scd30::Scd30

pub struct Scd30<T> { /* fields omitted */ }

Methods

impl<T, E> Scd30<T> where
    T: Read<Error = E> + Write<Error = E>, 
[src]

See the datasheet for I²c parameters.

pub fn new(i2c: T) -> Self[src]

Returns an Scd30 instance with the default address 0x61 shifted one place to the left. You may or may not need this bitshift depending on the byte size of your I²c peripheral.

pub fn new_with_address(i2c: T, address: u8) -> Self[src]

Returns an Scd30 instance with the specified address.

pub fn soft_reset(&mut self) -> Result<(), E>[src]

pub fn stop_measuring(&mut self) -> Result<(), E>[src]

pub fn set_automatic_calibration(&mut self, enable: bool) -> Result<(), E>[src]

Enable or disable automatic self calibration (ASC).

According to the datasheet, the sensor should be active continously for at least 7 days to find the initial parameter for ASC. The sensor has to be exposed to at least 1 hour of fresh air (~400ppm CO₂) per day.

pub fn set_forced_recalibration_value(&mut self, co2: u16) -> Result<(), E>[src]

pub fn start_measuring(&mut self) -> Result<(), E>[src]

Start measuring without mbar compensation.

pub fn set_measurement_interval(&mut self, seconds: u16) -> Result<(), E>[src]

pub fn start_measuring_with_mbar(&mut self, pressure: u16) -> Result<(), E>[src]

Start measuring with mbar (pressure) compensation.

pub fn data_ready(&mut self) -> Result<bool, E>[src]

pub fn read(&mut self) -> Result<Option<Measurement>, E>[src]

Auto Trait Implementations

impl<T> Send for Scd30<T> where
    T: Send

impl<T> Sync for Scd30<T> where
    T: Sync

Blanket Implementations

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self