So I’m trying to get the Triple Axis Magnetometer HMC5883L working with the Spark Core using the tutorial and code from http://bildr.org/2012/02/hmc5883l_arduino/. I’ve combined all of the libraries and source into one and got it compiling to the core; however, the serial output is nonsense. Either it’s constant 0’s for everything or rapidly and drastically changing numbers despite the magnetometer sitting still on a table.
I’ve noticed other threads pertaining to having issues with I2C so I also tried shifting the address one bit to the left getting 0x3C instead of 0x1E. The results were the same as above.
When hooked up to an Arduino Mega, everything works as expected with the correct data being output. Do you guys have any ideas what the problem might be or is there anything I can do or provide to help you narrow it down?