problem in programming arduino to measure acceleration

Hi, I am doing a project to measure the peak to peak acceleration and velocity of a vibration table. I used a acceleration sensor to measure this values. I am having problem in program. I need to neglect gravity and to find the linear acceleration. Some one please help me.

Start by reading this and follow the instructions.