[−][src]Struct sensor_scd30::Scd30
Scd30 sensor object This is generic over an I2C connector and associated error type
Methods
impl<Conn, Err> Scd30<Conn, Err> where
Conn: Base<Err>,
Err: Debug,
[src]
Conn: Base<Err>,
Err: Debug,
pub fn new(conn: Conn) -> Result<Self, Error<Err>>
[src]
Create a new Scd30 sensor instance
pub fn start_continuous(
&mut self,
pressure_compensation: u16
) -> Result<(), Error<Err>>
[src]
&mut self,
pressure_compensation: u16
) -> Result<(), Error<Err>>
Start continuous sensing mode with optional pressure compensation pressure_compensation should either be the current pressure in millibar or 0 to disable compensation
pub fn stop_continuous(&mut self) -> Result<(), Error<Err>>
[src]
Stop continuous sensing mode
pub fn set_measurement_interval(
&mut self,
interval: u16
) -> Result<(), Error<Err>>
[src]
&mut self,
interval: u16
) -> Result<(), Error<Err>>
Configure measurement interval in seconds
pub fn set_afc(&mut self, enabled: bool) -> Result<(), Error<Err>>
[src]
Enable or disable Automatic Self-Calibration
pub fn set_frc(&mut self, cal_ppm: u16) -> Result<(), Error<Err>>
[src]
Set Forced Recalibration Value This allows the sensor to be recalibrates using a reference CO2 source
pub fn set_temp_offset(&mut self, temperature: f32) -> Result<(), Error<Err>>
[src]
Set Temperature Compensation Allows compensation for temperature variation during operation
pub fn set_alt_offset(&mut self, altitude: u16) -> Result<(), Error<Err>>
[src]
Set Altitude Compensation Allows compensation for CO2 measurement using altitude over sea level
pub fn soft_reset(&mut self) -> Result<(), Error<Err>>
[src]
Soft reset the underlying device
pub fn firmware_version(&mut self) -> Result<u16, Error<Err>>
[src]
Fetch the device firmware version
pub fn data_ready(&mut self) -> Result<bool, Error<Err>>
[src]
Check whether measurement data is available in the buffer
pub fn read_data(&mut self) -> Result<Measurement, Error<Err>>
[src]
Read measurement data from the buffer
Auto Trait Implementations
impl<Conn, Err> RefUnwindSafe for Scd30<Conn, Err> where
Conn: RefUnwindSafe,
Err: RefUnwindSafe,
Conn: RefUnwindSafe,
Err: RefUnwindSafe,
impl<Conn, Err> Send for Scd30<Conn, Err> where
Conn: Send,
Err: Send,
Conn: Send,
Err: Send,
impl<Conn, Err> Sync for Scd30<Conn, Err> where
Conn: Sync,
Err: Sync,
Conn: Sync,
Err: Sync,
impl<Conn, Err> Unpin for Scd30<Conn, Err> where
Conn: Unpin,
Err: Unpin,
Conn: Unpin,
Err: Unpin,
impl<Conn, Err> UnwindSafe for Scd30<Conn, Err> where
Conn: UnwindSafe,
Err: UnwindSafe,
Conn: UnwindSafe,
Err: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
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> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,