I have been working on a door entry alarm and this is the code for it. The door entry alarm is basically photo resistor will a bunch of other stuff and it will go off every time the light is blocked off. I am confessing I did copy it from somebody else the link to the website is http://blogs.msdn.com/b/abhinaba/archive/2013/04/30/arduino-fun-door-entry-alarm.aspx and the name of the guy who created this project is Abhinaba Basu.