bmp280-driver

Crates.iobmp280-driver
lib.rsbmp280-driver
version0.0.7
sourcesrc
created_at2021-11-16 01:47:05.855878
updated_at2021-11-16 01:51:50.738851
descriptionA platform agnostic driver to interface with the BMP280 pressure sensor
homepage
repositoryhttps://github.com/nnarain/bmp280
max_upload_size
id482441
size14,211
Natesh Narain (nnarain)

documentation

https://docs.rs/bmp280-driver

README

bmp280

no_std driver for the bmp280 (pressure sensor).

Build Status

What works

  • Pressure sensor

Supported chips

  • BMP280;

Basic usage

Include library as a dependency in your Cargo.toml crates.io:

[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

Commit count: 22

cargo fmt