Crates.io | bmp388 |
lib.rs | bmp388 |
version | 0.1.0 |
source | src |
created_at | 2019-06-23 13:23:12.707465 |
updated_at | 2019-06-26 10:37:24.775413 |
description | A platform agnostic driver to interface with the BMP388 pressure sensor |
homepage | |
repository | https://github.com/ibutra/bmp388 |
max_upload_size | |
id | 142993 |
size | 21,399 |
no_std driver for the bmp388 (pressure sensor).
Include library as a dependency in your Cargo.toml :
[dependencies.bmp388]
version = "<version>"
Use embedded-hal implementation to get I2C handle and delay then create bmp388 handle:
extern crate bmp388; // or just use bmp388; if 2018 edition is used.
// to create sensor with default configuration:
let mut ps = bmp388::BMP388::new(i2c)?;
// to get pressure:
let pres = ps.sensor_values();
println!("{:?}", pres);
API Docs available on docs.rs.
Based on the bmp280 crate by Roma Sokolov and Alexander Zhuravlev.