Added accelerometer initializiation and readout functions.