pub enum Part {
Bme280,
Bmp280,
Sht3x,
Hdc1080,
Tmp117,
Scd4x,
Opt3001,
Ina219,
Ina226,
Ds18b20,
Replay,
}Expand description
A part the stock runner reads, as a wiring file names it.
Variants§
Bme280
Bosch BME280: temperature, relative humidity, and pressure, on I2C.
Bmp280
Bosch BMP280: temperature and pressure, on I2C.
Sht3x
Sensirion SHT3x: temperature and relative humidity, on I2C.
Hdc1080
TI HDC1080: temperature and relative humidity, on I2C at 0x40.
Tmp117
TI TMP117: temperature, on I2C.
Scd4x
Sensirion SCD4x: carbon dioxide, temperature, and relative humidity, on I2C at 0x62.
Opt3001
TI OPT3001: illuminance, on I2C.
Ina219
TI INA219: bus voltage, on I2C.
Ina226
TI INA226: bus voltage, on I2C.
Ds18b20
Maxim DS18B20: temperature, through the Linux kernel’s 1-Wire files.
Replay
A list of readings played back in turn, for trying a profile with nothing wired.
Implementations§
Source§impl Part
impl Part
Sourcepub const ALL: [Part; 11]
pub const ALL: [Part; 11]
Every part the runner reads, in the order the documentation lists them.
Sourcepub fn measures(self) -> &'static [(&'static str, &'static str)]
pub fn measures(self) -> &'static [(&'static str, &'static str)]
Returns what the part measures and the unit each comes out in.
§Returns
Each quantity with its unit, as a profile’s reads names them. A replay part
reads whatever the profile reads, so it lists nothing.
Sourcepub fn default_address(self) -> Option<u8>
pub fn default_address(self) -> Option<u8>
Returns the I2C address the part answers at unless the wiring names another.
§Returns
The address, or None for a part that is not on I2C.