| Crates.io | bmp5 |
| lib.rs | bmp5 |
| version | 0.2.2 |
| created_at | 2025-03-28 09:59:34.293028+00 |
| updated_at | 2025-03-29 07:34:43.642342+00 |
| description | An embedded_hal_async driver for the BMP5x series of pressure sensors from Bosch Sensortec. |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1609479 |
| size | 43,391 |
An embedded_hal_async driver for the BMP5x series of pressure sensors from
Bosch Sensortec.
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);
}