Started on accelerometer code