[−][src]Struct scd30::scd30::Scd30
Methods
impl<T, E> Scd30<T> where
T: Read<Error = E> + Write<Error = E>,
[src]
T: Read<Error = E> + Write<Error = E>,
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
Blanket Implementations
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Same<T> for T
type Output = T
Should always be Self