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.
- Rust 1.47
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 |
---|---|---|
ADXL313 | Analog Devices 3-axis accelerometer | |
ADXL343 | Analog Devices 3-axis accelerometer | |
ADXL355 | Analog Devices 3-axis accelerometer | |
LIS2DH12 | ST 3-Axis MEMS Accelerometer | |
LIS3DH | High Performance ST 3-Axis MEMS "nano" Accelerometer | |
MMA7660FC | Grove 3-Axis Digital Accelerometer | |
STK8BA58 | SENSORTEK 3-Axis MEMS Accelerometer | |
KXTJ31057 | Silicon Micromachined 3-axis accelerometer |
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.
We abide by the Contributor Covenant and ask that you do as well.
For more information, please see CODE_OF_CONDUCT.md.
Copyright © 2019-2020 NeoBirth Developers
Dual licensed under your choice of 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)