I'm having a few issues with a Compass module I bought recently. It's a Honeywell HMC6352 2-axis compass which communicates with a microcontroller through I2C. I'm not sure if anyone here will be familiar with this module or similar modules but fingers crossed!
The compass has various 'modes' including a calibration mode. I'm using it in a standard 'on demand' mode where I send a request to get a heading then read two 8 bit values from two registers to give me a 16 bit heading in tenths of degrees (0 - 3599).
I can do this and the compass returns seemingly sensible values no problem; as I rotate it the reading goes from 0 to 3599 as expected. There are two problems however.
The first is that the readings seem to be non linear, i.e. when I turn the module 90 degrees the reading does not change by 90 degrees; either more or less depeinding on orientation and location. I've calibrated the module multiple times and in different locations to the same effect.
The second problem is that when I move the module around the room the value changes, generally by plus or minus 30-50 degrees, despite the fact I'm not changing the actual rotation of the module (so the heading shouldn't change).
I've also tried getting another module but have similar results.
Any help? Sorry for the huge lump of text but I've tried to explain the problem in as much detail as possible.