2 releases
Uses old Rust 2015
0.0.7 | Nov 16, 2021 |
---|---|
0.0.6 | Nov 16, 2021 |
#1026 in Hardware support
Used in adafruit-nrf52840-sense
14KB
282 lines
bmp280
no_std driver for the bmp280 (pressure sensor).
What works
- Pressure sensor
Supported chips
BMP280
;
Basic usage
Include library as a dependency in your Cargo.toml :
[dependencies.bmp280-ehal]
version = "<version>"
Use embedded-hal implementation to get I2C handle and delay then create bmp280 handle:
extern crate bmp280_ehal; // or just use bmp280; if 2018 edition is used.
// to create sensor with default configuration:
let mut bmp = bmp280_ehal::BMP280::new(i2c)?;
// to get pressure:
let pres = bmp.pressure();
println!("{:?}", pres);
More examples
Number of examples can be found in proving-ground repo.
Documentation
API Docs available on docs.rs.
License
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
Dependencies
~71KB