read the accelerometer x, y and z values.