to do this properly you're going to want to take a careful look at the adxl330 datasheet (http://www.sparkfun.com/datasheets/Components/ADXL330_0.pdf). You want to start by mapping sensor numbers to acceleration due to gravity. You will get 1g of acceleration on the Z axis when the acclerometer is perfectly still & flat (on a table or something) and 0g of acceleration on the X and Y axes. See image below for orienting the other axes:
good luck & post back with your code when you work it out ![]()
cheers