Driver for a Honeywell HMC6352 digital compass.
All correct at time of writing, but as always, manufacturers love to move things around on their website.
This code has been tested using a SparkFun HMC6352 breakout:
This was wired to a CoreProto and plugged into a SenseCore:
And finally installed on a 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.
|HMC6352_I2C_ADDR||HMC6352 8-bit I2C address|
|hmc6352_read_heading||Read heading from compass|