Function to process the accelerometer/EMG/kinematic data and output as CSV