add magnetometer sketch