I used Parallax's Basic Stamp Homework Board and an accelerometer to use as a mouse. It works better than I thought it would. PySerial is used to grab the debugged values from the stamp. The circuit is compiled of two push buttons, 2 LEDs to tell when a button is pushed, and the accelerometer. The chip is coded in BASIC:
Where IN9, IN10 are the push buttons
and X on pin 8, Y on pin 7, and are read by pulse rate.
' {$STAMP BS2}
' {$PBASIC 2.5}
x VAR Word
y VAR Word
DO
PULSIN 8, 1, x
PULSIN 7, 1, y
DEBUG LF, ? x , ? y , ? IN9, ? IN10
LOOP