Magnetometers Problem.

Hi.

Im have magnetometer: mpu9250

Why does the rotate compass in my hands - the angle changes, but when I put it on an object and start to rotate object - the compass stands still?

Sometimes it can "Surprise" and act but most of the time nothing happens ....

I also checked on hmc5883l and it is the same.

I suspect that the item on which I place causes noises ... how can I protect myself against noises? are the modules more or less sensitive?

Avoid placing a magnetometer near magnetic objects, iron containing objects, or wires conducting large currents.

If you want to use the magnetometer as a compass, it must be calibrated. The best procedure is described here: