#temperature-sensor #embedded-hal #accelerometer #sync #async #spi-driver #i2c-driver

no-std lis2dtw12

no_std library for the LIS2DTW12 dual motion and temperature sensor using embedded-hal traits

8 releases

new 0.2.1 Dec 5, 2024
0.2.0 Nov 20, 2024
0.1.5 Nov 14, 2024
0.1.3 Oct 1, 2024
0.1.2 Sep 30, 2024

#606 in Embedded development

Download history 155/week @ 2024-09-21 325/week @ 2024-09-28 24/week @ 2024-10-05 10/week @ 2024-10-12 2/week @ 2024-10-19 204/week @ 2024-11-09 164/week @ 2024-11-16 27/week @ 2024-11-23 107/week @ 2024-11-30

503 downloads per month

Apache-2.0 OR MIT

82KB
1.5K SLoC

LIS2DTW12-RS

Crate Docs Build Status dependency status MIT licensed

A platform agnostic driver to interface with the LIS2DTW12 (3-axis accelerometer + temperature sensor). The driver uses the embedded-hal traits and supports interfaces with I2C and SPI. The driver supports async and blocking modes, selectable with the async and blocking features.

Resources

Running examples

NOTE

You may need to adjust the features for embassy depending on the chip you're using. This is just a configuration i was using when developing this.

The example can be run like this:

cargo run --example stm32l431-embassy-async --no-default-features --features "async"

Contributing

If you have any problems feel free to open an issue, if i find the time i might review and fix it.

Also feel free to open PRs if you miss some features or find bugs. PRs for documentation, tests, examples, etc. are also very welcome!

License

Dual licensed under your choice of either of:

Dependencies

~2MB
~43K SLoC