lis3dh-spi
This crate is a no_std driver for the LIS3DH accelerometer using SPI.
Datasheet
https://www.st.com/resource/en/datasheet/lis3dh.pdf
About this driver
This driver is not consuming the SPI bus the communication is running on. Bus has to be passed as mutable reference when interacting with the LIS3DH.
Usage
Add this to your Cargo.toml:
[]
= "0.0.5"
And this to your main.rs
let mut accelerometer = default;
accelerometer.set_l_p_en;
accelerometer.set_output_data_rate;
accelerometer.write_all_settings.ok;
let angle_and_gravity_offset = accelerometer.get_angle_and_gravity_offset.ok;
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.