Crate ms5837

Source
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§

FactoryCalibrationData
The factory calibration data as fetched from the PROM.
Initialised
An initialised ms5837 object.
TemperaturePressure
A group of temperature and pressure samples. These are grouped as pressure normalisation requires sampling the current temperature.
Uninitialised
An uninitialised ms5837 object.

Enums§

OverSamplingRatio
The oversampling ratio to use internal to the ADC. This is analogous to taking n samples and then takeing the average.
SensorError
A catch all error for this driver

Traits§

I2cMarker
State

Functions§

new
Create an uninitialised driver object