Although this is an awesome Wii hack using GlovePie and the Wiimote, you could probably do this a lot easier using a simple 3-axis accelerometer and a microcontroller.
I got this idea after seeing some physics class use the wiimote in some kinda pendulum experiment.
Why not use ...