Using python script to capture motion sensor data from the phone. This video shows some of the possibilities. Too bad it runs on Windows and not on Mac.