Update main code and adding the accelerometer functionnality
Added comment