Nice write-up on using RPi’s GPIO
http://www.makeuseof.com/tag/getting-started-with-gpio-on-a-raspberry-pi/