lps25hb

Crates.iolps25hb
lib.rslps25hb
version0.1.0
sourcesrc
created_at2021-08-15 18:12:39.773412
updated_at2021-12-08 18:49:09.820199
descriptionA platform agnostic driver to interface with LPS25HB pressure sensor module.
homepage
repositoryhttps://github.com/nebelgrau77/lps25hb-rs
max_upload_size
id437415
size54,388
Michal Lasak (nebelgrau77)

documentation

https://docs.rs/lps25hb

README

Rust LPS25HB pressure sensor driver

Maintenance Intention

A platform agnostic Rust driver for the ST Microelectronics LPS25HB pressure sensor, based on the embedded-hal traits.

Inspired by and partially based on another STMicroelectronics driver.

This driver allows you to:

  • check if sensor is reachable

  • read pressure and temperature

  • set data rate

  • configure interrupts generation

  • configure FIFO

UNDER ACTIVE DEVELOPMENT

Basic functions work, see example. Almost all functions added, and should work fine, but many aren't tested yet.

WORK IN PROGRESS:

This library is work in progress. Not all features are implemented yet. Currently only the I2C interface is implemented. Contributions are welcome.

TO DO:

  • add device ID check and power up in the new() function
  • add an example using FIFO and/or interrupt generation
  • add SPI interface and an example using it
  • add more documentation (main block in the lib.rs)

Some blog post

The device

The LPS25HB is an ultra-compact piezoresistive absolute pressure sensor which functions as a digital output barometer. The device comprises a sensing element and an IC interface which communicates through I2C or SPI from the sensing element to the application.

Datasheet: LPS25HB

Usage

To use this driver, import this crate and an embedded_hal implementation, then instantiate the device.

Please find additional examples using hardware in this repository: examples

Support

For questions, issues, feature requests, and other changes, please file an issue in the github project.

License

Licensed under either of

Contributing

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Commit count: 54

cargo fmt