This is the Arduino sketch we used to write out accelerometer data to an SD card while it. It's a minor modification of the Datalogger example code from the Arduino IDE.
Our hardware rig was:
- An Arduino Uno
- An Ethernet shield because it had an SD card reader on it.
- An ADXL335 3-axis accelerometer.
Here is a lightning talk about the device and the idea behind it.
The output of the Z-axis of our first experiment with it onboard checked luggage looked like this: