Expand description
§Getting started
A platform agnostic driver for the MS5837 from Texas Instruments.
This drivers supports reading the temperature/pressure from the on-chip ADC.
§Example
use ms5837::OverSamplingRatio;
let pressure_sensor = ms5837::new(i2c);
let mut pressure_sensor = pressure_sensor.init().unwrap();
println!(
"{:?}",
pressure_sensor
.read_temperature_and_pressure(OverSamplingRatio::R4096)
.unwrap()
);
Structs§
- Factory
Calibration Data - The factory calibration data as fetched from the PROM.
- Initialised
- An initialised ms5837 object.
- Temperature
Pressure - A group of temperature and pressure samples. These are grouped as pressure normalisation requires sampling the current temperature.
- Uninitialised
- An uninitialised ms5837 object.
Enums§
- Over
Sampling Ratio - The oversampling ratio to use internal to the ADC. This is analogous to taking n samples and then takeing the average.
- Sensor
Error - A catch all error for this driver
Traits§
Functions§
- new
- Create an uninitialised driver object