Skip to main content

Crate bmp581

Crate bmp581 

Source
Expand description

Platform-agnostic Rust driver for the Bosch BMP581 pressure and temperature sensor.

This crate provides a no_std compatible driver for the BMP581 barometric pressure sensor, using the embedded-hal traits for hardware abstraction.

§Features

  • I2C and SPI communication interfaces
  • no_std compatible for embedded systems
  • Configurable oversampling rates (OSR) and output data rates (ODR)
  • Interrupt configuration support

§Example

use bmp581::{Bmp581, I2cAddr};

let i2c = /* your I2C peripheral */;
let mut sensor = Bmp581::new_i2c(i2c, I2cAddr::Default);
let mut delay = /* your delay provider */;

sensor.init(&mut delay)?;

let temperature = sensor.read_temperature()?;
let pressure = sensor.read_pressure()?;

Re-exports§

pub use interface::I2cAddr;
pub use bmp581::Bmp581;

Modules§

bmp581
interface
types