Struct anyleaf::PhSensor[][src]

pub struct PhSensor {
    pub addr: u8,
    pub cal_1: CalPt,
    pub cal_2: CalPt,
    pub cal_3: Option<CalPt>,
}

Fields

addr: u8cal_1: CalPtcal_2: CalPtcal_3: Option<CalPt>

Implementations

Create a new sensor with an ADC I2C address of 0x49.

Set calibration to a sensible default for nitrate, with unit mg/L

Set calibration to a sensible default for phosphate, with unit mg/L

Set calibration to a sensible default for potassium, with unit mg/L

Take a pH reading

Useful for getting calibration data

Useful for getting calibration data

Calibrate by measuring voltage and temp at a given pH. Set the calibration, and return (Voltage, Temp).

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.