You will find here tutorials to use the GPIO port of your Raspberry Pi in many different ways.
Here are the available tutorials:
Connect a comparative coin mechanism to a Raspberry Pi
Enable GPIO button to close the emulator by pressing one button
GPIO controllers
Keyboard touches via GPIO
Play with your original controller with Gamecon
Set until 4 features on each GPIO port