Add functionality of demo acceleration

Python function to add data to data.txt, Matlab function for
accelerometer demo.