Using an Arduino in series with a 3-axis acceleromter and 3-axis gyroscope.