Thermostat type program - wanted

hi,
i dont suppose anybody has come across a thermostat type program have searched high/low but havnt found anything, what im looking for is something that you can control the temp of a room via a fan.

ie when the temp gets out of range it turns on a relay which switches on a fan to cool down the room, then switches off when the temp is correct.

be great if an lcd was involved to see the temp as well

thank you

You really couldn't find any examples of reading an input and controlling an output using the result?

no i couldnt, i managed to find a gps type project, thats the reason why i posted here for help in finding one.

thank you dxwood, now ive found a few