4 releases (2 stable)
1.0.2 | Feb 28, 2024 |
---|---|
1.0.1 | Feb 21, 2024 |
0.1.1 | Jan 22, 2023 |
0.1.0 | Jan 13, 2023 |
#290 in Embedded development
24 downloads per month
64KB
1.5K
SLoC
bosch_bme680
A pure rust driver for the Bosch BME680 environmental sensor that focuses on ease of use.
Additional information
- BME680 product page
- Official C version
- More detailed documentation can be found in the download section of the product page.
Simple example
Mock i2c and delay have to be replaced with specific hardware crates.
fn main() -> ! {
let i2c = mock::blocking_i2c();
let delay = mock::MockDelay;
let config = bosch_bme680::Configuration::default();
let mut bme = Bme680::new(i2c, DeviceAddress::Primary, delay, &config, 20).unwrap();
thread::sleep(Duration::from_millis(100));
loop {
thread::sleep(Duration::from_secs(2));
let values = bme.measure().unwrap();
println!("Values: {values:?}\n");
}
}
Dependencies
~185KB