How to convert analogRead value from accelerometer

I have the same type accelerometer, and I find I need to calibrate each axis for -1, 0, and 1 G. You can do this by orienting the accelerometer with each axis pointing up, down, or sideways, and averaging a large number of samples. Ideally, 0 should be -3 G, 511 should be zero G and 1023 should be +3 G, but I find they're each a little different.

Have fun!

D.