Take a look at this post about using GPIO on raspberry pi.
There is also another guide to using the Pi for Temp and Humidity, if needed let me know.