7 releases
Uses old Rust 2015
0.2.0 | Aug 28, 2019 |
---|---|
0.1.5 | Oct 24, 2018 |
#1592 in Embedded development
21 downloads per month
38KB
827 lines
lsm303c
no_std driver for the lsm303c (accelerometer + magnetometer/compass).
What works
- To be tested
Supported chips
LSM303C
;
Basic usage
Include library as a dependency in your Cargo.toml :
[dependencies.lsm303c]
version = "<version>"
Use embedded-hal implementation to get I2C handle and delay then create lsm303c handle:
extern crate lsm303c; // or just use lsm303c; if 2018 edition is used.
// to create sensor with default configuration:
let mut lsm = LSM303::default(l2c, &mut delay)?;
// to get all supported measurements:
let all = marg.all()?;
println!("{:?}", all);
More examples
Number of examples can be found in proving-ground repo.
Documentation
API Docs available on docs.rs.
License
Licensed under 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)
at your option.
Testimonials
Started off as a fork of japaric's lsm303ldhc repo.
Dependencies
~110KB