#tracking #acceleration #position #driver

no-std accelerometer

Generic, embedded-friendly accelerometer support, including traits and types for taking readings from 2 or 3-axis accelerometers and tracking device orientations

16 releases (breaking)

0.12.0 Jun 13, 2020
0.11.0 Jan 23, 2020
0.10.0 Dec 3, 2019
0.9.0 Nov 14, 2019
0.3.0 Mar 31, 2019

#164 in Embedded development

Download history 1303/week @ 2024-06-14 1370/week @ 2024-06-21 1795/week @ 2024-06-28 1263/week @ 2024-07-05 1942/week @ 2024-07-12 1825/week @ 2024-07-19 1487/week @ 2024-07-26 1495/week @ 2024-08-02 2385/week @ 2024-08-09 2099/week @ 2024-08-16 1895/week @ 2024-08-23 3098/week @ 2024-08-30 2361/week @ 2024-09-06 2222/week @ 2024-09-13 2317/week @ 2024-09-20 1740/week @ 2024-09-27

9,145 downloads per month
Used in 37 crates (21 directly)

Apache-2.0 OR MIT

30KB
185 lines

accelerometer.rs

Crate Docs Build Status Safety Dance MSRV LGPL 3.0 licensed Gitter Chat

Generic Rust accelerometer support, including traits and types for taking readings from 2 or 3-axis accelerometers, intended for use with platform-agnostic accelerometer drivers written using embedded-hal.

Uses no_std-oriented 2D and 3D vector types from the micromath.rs crate.

Additionally includes support for tracking device orientations using accelerometer data.

Documentation

Requirements

  • Rust 1.31+

Supported Crates

The following dependent crates providing platform-agnostic accelerometer drivers built on embedded-hal which also implement the Accelerometer and/or the RawAccelerometer traits from this crate:

Device Name Description Crate + Docs
ADXL343 Analog Devices 3-axis accelerometer crates.io docs.rs
ADXL355 Analog Devices 3-axis accelerometer crates.io docs.rs
LIS2DH12 ST 3-Axis MEMS Accelerometer crates.io docs.rs
LIS3DH High Performance ST 3-Axis MEMS "nano" Accelerometer crates.io docs.rs
MMA7660FC Grove 3-Axis Digital Accelerometer crates.io docs.rs

Orientation Tracking (3-axis accelerometers only)

ezgif-1-16e98d9b86ad

One of the main features of this crate is device orientation tracking for 3-axis accelerometers, which is gated under the orientation cargo feature (enabled-by-default). This provides smartphone-like device position sensing using an accelerometer alone, returned as one of the variants of the accelerometer::Orientation enum.

See the accelerometer::Tracker documentation for more information.

Code of Conduct

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

For more information, please see CODE_OF_CONDUCT.md.

License

Copyright © 2019-2020 NeoBirth Developers

Dual licensed under your choice of either of:

Dependencies

~465KB
~12K SLoC