Skip to content

embedded-hal driver for lsm303c (digital accelerometer + compass)

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

copterust/lsm303c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lsm303c

no_std driver for the lsm303c (accelerometer + magnetometer/compass).

Build Status

What works

  • To be tested

Supported chips

  • LSM303C;

Basic usage

Include library as a dependency in your Cargo.toml crates.io:

[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

at your option.

Testimonials

Started off as a fork of japaric's lsm303ldhc repo.

About

embedded-hal driver for lsm303c (digital accelerometer + compass)

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published