Overview

Driver for a Honeywell HMC5843 magnetometer.

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/Defense_Brochures-documents/HMC5843.pdf

Test hardware

This code has been tested using a SparkFun HMC5843 breakout: http://www.sparkfun.com/products/9371

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/

Specification
Parameter Supported settings
Bandwidth (Hz) 116
Range (µT) ±400
Communication up to 400 kHz (I2C)

API Summary

Macros
HMC5843_I2C_ADDR HMC5843 8-bit I2C address
Functions
hmc5843_initialize_i2c Initialize sensor on I2C bus