The Raspberry Pi includes pins called GPIO that can be connected directly to a few buttons
and a joystick, similar to the encoder boards we saw previously.
GPIO layout by raspberrypi.org
The preceding layout is of Model A and Model B. Model A+ and B+ include even more
pins but are backwards compatible with the A and B pin layout. The pins we are interested
in are the yellow and black-labeled pins. The other pins—1, 3, 4, and 17 are power pins.
Because the buttons don't require power, we can safely ignore these. All of your buttons'
ground wires should connect to a common ground pin. The other wires should individually
be connected to an independent yellow GPIO pin.
While pin 8 and 10 look like proper GPIO pins, they are actually serial ports, so you should
avoid using them.
Once you have connected the wires, you will need to install an application that will read
from the GPIO pins and output a keyboard command.
Adafruit ( http://www.adafruit.com/ ) has released a utility called Retrogame that does just
this. It is a small C program that you can edit, then build, and run to read input from your