| Crates.io | ms5637 |
| lib.rs | ms5637 |
| version | 0.1.0 |
| created_at | 2023-12-14 23:20:10.171976+00 |
| updated_at | 2023-12-14 23:20:10.171976+00 |
| description | no-std I2C driver for the MS5637 temperature and pressure sensor. |
| homepage | |
| repository | https://github.com/decryphe/ms5637 |
| max_upload_size | |
| id | 1070489 |
| size | 24,821 |
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.
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.