kutenda:
Stupid question what is an analogRead ?
And okay I just need the axis to measure left and right
You should probably learn the basics first, before you try to tackle your project. Didn't your teacher teach you how to use the arduino and its software?
Take a look at the arduino reference page.
An accelerometer measures delta in enertial energy in x,y,&z. when the difference in enertia reaches zero (there is no more acceleration in that vector), the output for that vector goes to zero. That measurement is not an indication of how far the chip was moved, but rather, how fast (or hard) it was moved.
*Inertia, and yes, by definition, when the accelerometer is static it should output 0 because there are no acting forcing to tell it otherwise. But these accelerometers output a voltage regardless. If you shake it, the output will show a large value like 900, but if you just tilt them you will still see an output even if it is flat on it's side.
*This value changes from side to side.
Get one and try it.