pub struct OrpSensor {
pub addr: u8,
pub cal: CalPtOrp,
}Fields§
§addr: u8§cal: CalPtOrpImplementations§
Source§impl OrpSensor
impl OrpSensor
pub fn new() -> Self
Sourcepub fn new_alt_addr() -> Self
pub fn new_alt_addr() -> Self
This isn’t intended to be used by the standalone module, but by the water monitor, which connects the ORP sensor to the second ADC, although it still uses differential input A0, A1.
Sourcepub fn read_voltage<I2C, E>(&mut self, i2c: &mut I2C) -> f32
pub fn read_voltage<I2C, E>(&mut self, i2c: &mut I2C) -> f32
Useful for getting calibration data
Sourcepub fn calibrate<I2C, E>(&mut self, ORP: f32, i2c: &mut I2C) -> f32
pub fn calibrate<I2C, E>(&mut self, ORP: f32, i2c: &mut I2C) -> f32
Calibrate by measuring voltage at a given ORP. Set the calibration, and return Voltage.
pub fn calibrate_all(&mut self, pt: CalPtOrp)
pub fn reset_calibration(&mut self)
Auto Trait Implementations§
impl Freeze for OrpSensor
impl RefUnwindSafe for OrpSensor
impl Send for OrpSensor
impl Sync for OrpSensor
impl Unpin for OrpSensor
impl UnwindSafe for OrpSensor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more