This is a simple example of a minecraft redstone system. The only thing you'll need to worry about is a variable that the light source receives called "active" When a redstone turned on hits this object it'll set the active to true, if not it sets to false. With that ONE variable you can turn objects on and off :)
End User Licence Agreement (EULA).