ms5637 0.1.0

no-std I2C driver for the MS5637 temperature and pressure sensor.
Documentation
  • Coverage
  • 80.95%
    17 out of 21 items documented0 out of 7 items with examples
  • Size
  • Source code size: 25.52 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.97 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 11s Average build duration of successful builds.
  • all releases: 11s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • decryphe/ms5637
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • decryphe

I2C-driver for MS5637

Implements a driver for accessing an MS5637 temperature and pressure sensor.

The library is built to work with [embedded-hal] and has been tested on an STM32L072 micro controller. The 1st-order temperature compensation is implemented as per the datasheet definition, and inspired by the implementation in the Sparkfun MS5637 library. The 2nd-order temperature compensation is probably wrong and untested, but may be activated using the feature flag second-order. Additional height adjustment methods available in the Sparkfun library were copied over for convenience and may be enabled using the altitude-adjust feature flag.

Usage

Using the library is very easy, just provide something that can delay execution by a specific time, and a reference to the I2C bus itself:

let mut ms5637 = ms5637::MS5637::new(&mut syst_delay, &mut i2c_bus);
let reading = ms5637.read_temperature_and_pressure_1st_order(&mut syst_delay, &mut i2c);

The library can be cooperatively used iwth other sensors on the same I2C-bus.