Adding the accelerometer graphing function, complete the recording data for accelerometer function