Here is a small program I made to play my favorite Quake3 Arena mod -- Urban Terror.
This is not my original idea. I saw someone else do it on youtube.
The dev board is kl46z. It has an accelerometer already on it. The board is placed on a wobble board to act as a foot driven joystick. Urban Terror has no analog support, therefore movement must be sent as key presses. The hardware button levels the device so that it can be operated at an angle.
It works pretty well. Would be nice to have a return spring so that the board settles to zero when I take my feet off.
You can see in the code, I tried to reference the Z axis for twisting the board. It took me a lot of noodling before I discovered that the axis which is aligned with gravity is blind to rotation. There is likely a way to use the magnetometer in a sensor fusion arrangement but I have not gotten that far.
http://pastebin.com/9ec1e6C1Constructive criticism welcome.