Skip to content

embedded-hal compatible driver for bmp280 pressure sensor

Notifications You must be signed in to change notification settings

copterust/bmp280

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

embedded-hal compatible driver for bmp280 pressure sensor

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages