HMC 5883l

I try to make a compass with hmc5883l. After I calibrate it it works ok. When I move it to another root and change the height but still keep it flat it gives me different values, any idea?? (I used to use X-Z, now I do a test with X-Y)

Do you try that indoors? Is "root" meant literally, so you try it in a forest? Metal in the environment influence a compass so values may change because of that. What range are the changes in?

Try the magnetic compass of your smartphone indoors, it will probably show the same results. Theses sensors don't work if there is metal within a few meters.

Do not double post