Accelerometer class set up