Read accelerometer value only once per frame.