5 releases
Uses new Rust 2024
new 0.2.2 | Mar 29, 2025 |
---|---|
0.2.1 | Mar 29, 2025 |
0.2.0 | Mar 28, 2025 |
0.1.1 | Mar 28, 2025 |
0.1.0 | Mar 28, 2025 |
#366 in Hardware support
406 downloads per month
23KB
454 lines
Rust Driver For BMP5 Pressure Sensors
An embedded_hal_async
driver for the BMP5x series of pressure sensors from
Bosch Sensortec.
Usage
use defmt::info;
use bmp5::{Config as Bmp5Config, i2c::{Bmp5, BMP5_ADDRESS}};
async {
// Replace i2c with an implementation of embedded_hal_async::i2c::I2c
let mut sensor = Bmp5::new(i2c, Delay, BMP5_ADDRESS, Bmp5Config::default());
// Initialize the sensor.
sensor.init().await.unwrap();
// Take a measurement.
let measuement = sensor.measure().await.unwrap();
info!("Temperature: {}°C, Pressure: {}Pa", measuement.temperature, measuement.pressure);
}
Dependencies
~170–345KB