3 stable releases

Uses old Rust 2015

1.1.0 Sep 7, 2018
1.0.1 Aug 16, 2018

#20 in #magnetometer

32 downloads per month
Used in mpu9250-dmp

MIT license

10KB
209 lines

AK8963 Library for Rust Latest Version Documentation

A library for the AK8963 magnetometer. Only supports the i2c interface (no SPI).

Features

  • Reads the sensitivity adjustment values from the Fuse ROM and applies them.
  • Adjustable sensitivity and continuous measurement rate.
  • Exposes data-not-ready, data overrun, and magnetic saturation cases.

Usage

See basic test in lib.rs or examples/scan.rs.

Testing

By default, uses i2c bus=1, addr=0x0c. To override, use these environment variables:

MS5611_I2C_BUS2=1 MS5611_I2C_ADDR=12 cargo test

Resources


lib.rs:

A library for the AK8963 magnetometer.

Dependencies

~3.5–5MB
~91K SLoC