HMC5883

Now i get normal values for angle, when i rotate compass from 0 to 270 degrees. There are region in 90 degrees(270-360), where compass have non stable and wrong data.
When i rotate compass i get negative value from 0 to -135 and it value i (angle*2) and i think that i have right value, but all value from 0 to 270 degrees is negative, but i use atan2 function.
TWI_COMPASS.rar (108 KB)