Crate bosch_bme680

Source
Expand description

This a pure rust crate to read out sensor data from the BME680 environmental sensor from bosch.

Notes: This library only supports reading out data with I²C but not SPI and only works for the BME680 and NOT for the BME688 though this could be implemented. The official c implementation from Bosch was used as a reference.

For further information about the sensors capabilities and settings refer to the official product page.[]

§embedded-hal-async usage

This crate has optional support for embedded-hal-async, which provides asynchronous versions of the embedded-hal traits. To avoid an unnecessary dependency on embedded-hal-async for projects which do not require it, the embedded-hal-async support is an optional feature.

In order to use the embedded-hal-async driver, add the following to your Cargo.toml:

[dependencies]
bosch-bme680 = { version = "1.0.3", features = ["embedded-hal-async"] }

Then, construct an instance of the AsyncBme680 struct using the embedded_hal_async I2c and Delay traits.

Structs§

AsyncBme680embedded-hal-async
Asynchronous BME680 sensor driver.
Bme680
Sensor driver
Configuration
Used to set Sensor settings. All options not set by the builder are set to default values.
GasConfig
Used to enable gas measurement. Default values are 150ms heater duration and 300°C heater target temperature
MeasurmentData
Measurment data returned from the sensor

Enums§

BmeError
All possible errors
DeviceAddress
Use Primary if SDO connector of the sensor is connected to ground and Secondary if SDO is connected to Vin.
IIRFilter
IIR filter control only applies to temperature and pressure data.
Oversampling
Oversampling settings for temperature, humidity, pressure. Skipping means no measurement will be taken, which is not recommended for the temperature as it’s needed to calculate the adjusted values for humidity and pressure.