Skip to content

heyitsanthony/qmc5883l

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

An embedded-hal rust no_std driver for the QMC5883L magnetometer chip.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages