adxl355 0.1.0

A platform agnostic driver to interface with the ADXL355 through SPI (accelerometer)

ADXL355 embedded-hal driver crate


Include library as a dependency in your Cargo.toml

version = "<version>"

Use embedded-hal implementation to get SPI and a GPIO OutputPin for the chip select, then create the accelerometer handle

use adxl355::{Adxl355, Accelerometer};

// to create sensor with default configuration:
let mut accelerometer = Adxl355::default(spi, cs)?;

// start measurements

// to get 3d accerlation data:
let accel = accelerometer.acceleration()?;
println!("{:?}", accel);

// One can also use conf module to supply configuration:

use adxl355::{Adxl355, Config as ADXLConfig, ODR_LPF, Range, Accelerometer};

Adxl355::new(spi, cs,