This project, and all accompanying code, was completed in 24 hours during the Graphene Hackathon hosted by the GEIC in Manchester, UK. It is rudimentary and admittedly would perform very poorly in any real world situation; however, it sufficed as a proof-of-concept in the judging stage of the event, for which we won first prize and the innovation prize.
Everything created at the event is in the public domain and free to use. This code is simplistic but it may serve to inform other hackers/enthusiasts about the process we used to create this project.
For this project we used the Adafruit Flora and the LSM303 accelerometer to measure the change in position and orientation of the glove. In order to upload a project to the Flora it is necessary to first install the Arduino IDE and additional Adafruit libaries.
To run the python code with conditional motion interpretation, we installed the library pySerial, which allows the script to read from the Flora's port on the laptop.