ADXL335 3-Axis Accelerometer
The ADXL335  is a triple axis MEMS accelerometer with extremely low noise and a power consumption of only 320 µA. It gives three analogue outputs proportional to g, with a full sensing range of ±3 g. The sensor can operate from between 1.8 V and 3.6 V; some breakout boards include a regulator to allow operation at 5 V.
Reading the sensor data
The sensor gives three analogue outputs proportional to the g on each axis; the following routine returns a list of the three readings, assuming the X, Y, and Z outputs are connected to ADC pins 0, 1, and 2 respectively:
(defun xyz () (list (analogread 0) (analogread 1) (analogread 2)))