Check out this homebrew accelerometer controlled USB gamepad using a PIC18F2550 from Starlino. You’ll find code and schematics on their site.
The code for the firmware was written in PicBasic Pro and it implements a HID USB device with 2 axes and 4 buttons (only 2 buttons connected in the prototype). The device is detected by Windows XP/Vista as a standard USB gamepad and can be used with many games and applications.
I am using a 2 Axes Buffered ±2g Accelerometer from DIMENSION ENGINEERING, it has a built in voltage regulator that allows powering the accelerometer directly from the USB bus (5V)
ADVERTISEMENT