attach the accelerometer