#accelerometer #embedded-hal-driver #mems #imu #compass

no-std lsm303dlhc-ng

A platform agnostic driver to interface with the LSM303DLHC (accelerometer + compass)

5 releases

0.3.4 Jul 2, 2024
0.3.3 Jul 2, 2024
0.3.2 Jul 1, 2024
0.3.1 Jul 1, 2024
0.3.0 Jul 1, 2024

#1689 in Embedded development

MIT/Apache

27KB
436 lines

STMicroelectronics LSM303DLHC I²C driver

Crates.io Docs Build Status MSRV EUPL 1.2 licensed Apache 2.0 licensed MIT licensed

A platform-agnostic driver to interface with the LSM303DLHC (accelerometer + compass)

Do note that the sensor is discontinued and that documentation is scarce. Owners of an STM32F3 Discovery board may still find this crate useful, among others.

What works

  • Reading the accelerometer in I²C blocking mode
  • Reading the compass and temperature sensor I²C blocking mode
  • Direct access to registers via lsm303dlhc-registers structs and hardware-registers traits

License

Licensed under either of

at your option.

Contribution

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 triple licensed as above, without any additional terms or conditions.

Code of Conduct

We abide by the Contributor Covenant and ask that you do as well.

Dependencies

~0.9–1.4MB
~32K SLoC