Skip to content

13bit ±4g 3-axis accelerometer from Analog Devices. Rust driver using the accelerometer crate

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

mvniekerk/adxl313-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ADXL313 embedded-hal SPI driver crate

Rust HAL implementation (using SPI drivers) for Analog Device's ADXL313 3-axis accelerometer. Based off the adxl355 crate

Usage

Include library as a dependency in your Cargo.toml

[dependencies.adxl313]
version = "<version>"

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

use adxl313::{Adxl313, Accelerometer};

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

// start measurements
accelerometer.start_measuring();

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

About

13bit ±4g 3-axis accelerometer from Analog Devices. Rust driver using the accelerometer crate

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages