HMC5883L magnetometer code