HMC6352 compass sensor

Hi forum!
So im testing this sensor http://grobotronics.com/compass-module-hmc6352.html#.UntlXPlT78w with the code provided from here Arduino Playground - Hmc6352 .. Had to rename send and recieve to write and read (in the code) and got it to work. Now the serial monitor in the arduino IDE says periodicaly :

current heading : 0. 0 degrees

even if i rotate the sensor it won't change..

Any thoughts what is the problem here?

Do you know whether you are actually communicating with the device at all ?

If you are printing zeros, then probably not.

Where/how can i see if it comunicates or not ?

Im sorry if my question is stupid :~ Im a newbie

When testing I2C device communication you probably need an oscilloscope. However, one of the most common errors is to not have the correct pullup resistors (about 4.7 kOhms) on SDL and SCL. Do you have them?

I read about that device and it seems to be obscure and annoying.

I suggest you find the sketch which scans the I2C bus for connected devices, and see if your device responds. if it does, then you will know that the electrical hookup is OK. You need to be concerned with the voltage levels and the pullup resistors on the two I2C signal wires.

it seems to be obscure and annoying

While it does have its quirks, mine works well :wink: HMC6352 2D magnetometer revisited - SparkFun Electronics Forum