Add function to get accelerometer values.