What values does the chip return for the magnetometer's X, Y and Z?
uT for each axis
Do they as expected when you rotate the chip and align each axis to the local magnetic field?
could you please explain
When you align one axis parallel to the magnetic field it should give the maximum reading and the others should give 0.
Hold one axis perpendicular to the magnetic field and rotate the chip around that same axis.
Do the other axes follow a sine and cosine relative to the rotation?
How exactly does atan2 (x,y) "not work at all"?
when I rotate, the angle goes from 0 to 180 only
Does it perhaps go from
-180 to 180?
If not, please be more precise.
Could you post a table of the raw x, y, z values for each 30 degrees of rotation?
How are you testing it and what results are you getting?
I am comparing it with my iPhone
I would find a pair of magnets to create a more controlled magnetic field.