added a meanReading calibration step to calibrate the accelerometer