There are numerous examples of this on youtube but one thing I might suggest is to think about getting a Gertboard for your Pi:
http://www.google.com/search?q=Gertboa ... =0CDkQsxg
A Gertboard has all kinds of inputs and outputs and has open collectors, buttons, leds and relay connections to accomplish everything you are referring to. Additionally the Gertboard has the same chip as an Arduino microcontroller so you could even write easy to understand Sketch programs to run your experiments. Here are some specific links you may want to check out!
Great stuff on how to get the Gertboard up and running on your Pi and also how to get the example programs to run!
https://projects.drogon.net/raspberry-pi/gertboard/
This youtube link will show you a bunch of videos on the Gertboard as well:
http://www.youtube.com/results?search_q ... JiD033mDWw
If you buy a Gertboard DO NOT buy a KIT unless you want to learn how to solder!
Hope that helps!