`accelerometer`
FreeGeneric accelerometer support, including traits and types for taking readings from 2 or 3-axis accelerometers and tracking device orientations - [](https://crates.io/crates/accelerometer)
About `accelerometer`
Accelerometer.rs is a Rust library providing generic support for accelerometers, including traits and types for taking readings from 2 or 3-axis accelerometers. It is designed for platform-agnostic accelerometer drivers built on embedded-hal and uses no_std-oriented 2D and 3D vector types from the micromath.rs crate. A key feature is device orientation tracking for 3-axis accelerometers, which returns smartphone-like position sensing as an Orientation enum. The library is dual-licensed under Apache-2.0 and MIT, and is maintained by the rust-embedded-community organization.
Key Features
Pros & Cons
- Generic and reusable traits allow easy integration with multiple accelerometer models
- Orientation tracking provides high-level position information without complex math
- Designed for embedded systems with no_std support and minimal dependencies
- Community-maintained with a code of conduct and clear licensing
- Requires Rust 1.47+ and familiarity with embedded-hal ecosystem
- Orientation tracking only supported for 3-axis accelerometers
- Limited to accelerometer data; does not include gyroscope or magnetometer fusion