An I2C driver for the SPL06-007 barometric pressure and temperature sensor, intended for use in embedded environments.
Usage
The driver is designed to be used with embedded-hal and requires an I2C interface to be passed to the driver. The driver is generic over the I2C interface and the error type, allowing it to be used with any I2C implementation so long as it supports the required traits.
Add the following to your Cargo.toml:
[]
= "0.3"
Example usage on an Arduino Uno:
use *;
use panic_halt as _;
use Barometer;
!
You can set the mode, sample rate, and oversampling values manually:
barometer.set_pressure_config;
barometer.set_temperature_config;
This is useful for more rapid updates, better precsion, or lower power draw.
It is also possible to set the mode to Mode::Standby
to reduce power consumption:
barometer.set_mode;