Overview

Driver for a Honeywell HMC6352 digital compass.

Resources

All correct at time of writing, but as always, manufacturers love to move things around on their website.

Web page

http://www.magneticsensors.com/

Datasheet

http://www51.honeywell.com/aero/common/documents/myaerospacecatalog-documents/Missiles-Munitions/HMC6352.pdf

Test hardware

This code has been tested using a SparkFun HMC6352 breakout:

http://www.sparkfun.com/products/7915/

This was wired to a CoreProto and plugged into a SenseCore:

http://soldercore.com/products/sensecore/

And finally installed on a SolderCore:

http://soldercore.com/products/soldercore/

Note that the SenseCore's default address was changed from 0x42 to 0x46 by moving the solder jumpers such that it does not conflict with the HMC6352's default address.

API Summary

Macros
HMC6352_I2C_ADDR HMC6352 8-bit I2C address
Functions
hmc6352_read_heading Read heading from compass