1 unstable release

Uses old Rust 2015

0.0.1 Jun 28, 2019

#15 in #compass

Download history 109/week @ 2024-07-22 50/week @ 2024-07-29 62/week @ 2024-08-05 4/week @ 2024-08-12 8/week @ 2024-08-19 29/week @ 2024-08-26 24/week @ 2024-09-02 42/week @ 2024-09-09 50/week @ 2024-09-16 60/week @ 2024-09-23 10/week @ 2024-09-30 8/week @ 2024-10-07 32/week @ 2024-10-14 15/week @ 2024-10-28 65/week @ 2024-11-04

112 downloads per month

AGPL-3.0-or-later

16KB
140 lines

QMC5883L

An embedded rust no_std driver for the QMC5883L magnetometer chip.

Usage

Include library as a dependency in your Cargo.toml:

[dependencies.qmc5883l]
version = "<version>"

To use the sensor, call QMC5883L::new with an embedded-hal i2c device:

extern crate qmc5883l;

// Create the sensor in soft-reset mode.
let mut dev = QMC5883L::new(i2c_dev).unwrap();
// Enable data collection.
dev.continuous().unwrap();
// Get magnetometer (x,y,z) measurement.
let (x, y, z) = dev.mag().unwrap();

Documentation

API documentation is generated on docs.rs.

License

Licensed under AGPL-3.0.


lib.rs:

A platform agnostic driver to interface with the QMC5883L magnetometer.

This driver was built using embedded-hal traits.

Dependencies

~71KB