accelerometer programming

I understand my explanation is a bit confusing.
Basically I haven't connected anything yet and the components are still in their box but the project I was given by my teacher was to connects led lights that signify left and right.
What the accelerometer does is cancel the command of the light being on when the accelerometer reachers center. Which in this case is between +2 and -2 figures are an example because I don't know how they actually calculate it

I hope that helps