HMC5883L magnetometer problem

Asking me? The only arduino lib which works somehow imho is the HMC58X3v04 (Varesano.net). You have to calibrate the sensor before using it as there could be a significant offset. Also you need a proper math there to compensate tilt (not easy, btw). The sensor is extremely sensitive so it depends on its environment where it points :slight_smile:

PS: varesano.net -