Crate bmp390

source ·
Expand description

The BMP390 is a digital sensor with pressure and temperature measurement based on proven sensing principles. The sensor is more accurate than its predecessor BMP380, covering a wider measurement range. It offers new interrupt functionality, lower power consumption, and a new FIFO functionality. The integrated 512 byte FIFO buffer supports low power applications and prevents data loss in non-real-time systems.

Bmp390 is a driver for the BMP390 sensor. It provides methods to read the temperature and pressure from the sensor over I2C. It is built on top of the embedded_hal_async::i2c traits to be compatible with a wide range of embedded platforms.

§Example

use bmp390::Bmp390;
let config = bmp390::Configuration::default();
let mut sensor = Bmp390::try_new(i2c, bmp390::Address::Up, delay, &config).await?;
let pressure = sensor.pressure().await?;
println!("Pressure: {:.2} hPa", pressure);

§Datasheet

The BMP390 Datasheet contains detailed information about the sensor’s features, electrical characteristics, and registers. This package implements the functionality described in the datasheet and references the relevant sections in the documentation.

Structs§

Enums§

  • The BMP390 barometer’s I2C addresses, either 0x76 or 0x77.
  • Errors that can occur when communicating with the BMP390 barometer.
  • Available commands that can be written to Register::CMD.
  • The IIR filter can suppress short-term pressure disturbances by filtering internally.
  • The interrupt level for the INT pin.
  • The interrupt output type for the INT pin.
  • The output data rate (ODR) is the rate at which the sensor provides new data.
  • Oversampling settings for pressure and temperature measurements.
  • The BMP390 offers three power modes: sleep mode, forced mode and normal mode.
  • The BMP390 has a number of registers to provide access to the sensor’s data and control various settings.