HMC5883L and Arduino Uno output L2C issue?

We are using an HMC5883L with an arduino uno with the intent of using it as a compass. We are using the code from http://hobbylogs.me.pn/?p=17. However serial monitor returns the same values for magnetic field in the x, y and z axises, thus giving us the same bearing. No matter how much we re-orientate the sensor the outputs stay roughly the same, perhaps varying by 0.1~. Does anyone know what the issue might be?

Have you gone through the calibration procedure described in the HMC5883L data sheet?

Post your code, using code tags ("<>" button) and a circuit diagram showing how you have connected it.