Wire.h - No need to included it at the top of your sketch. QMC5883L Compass will included it for you. Just ensure that it is installed in your IDE. QMC5883L Compass Library calculates the direction ...
extern float compass_x_offset, compass_y_offset, compass_z_offset; extern float compass_x_gainError,compass_y_gainError,compass_z_gainError; ...
We don’t have much personal experience with DOF hardware, but this Arduino library which reads and compensates for three-axis magnetometer and accelerometer data looks very impressive. It should work ...