The start of the code:
starting with an explanation of how I want it to work....
//mission is to use the servo as a lock on a box.
//the servo should only be able to open the lock when the LDR AND a pusbutton is active.
// when sun is shining + a person pushes the button.
// when the lid is closed a micro swith should trigger the signal to reset the servo to start position
//permission to activate servo :
//Digital input from door-microswitch (closed) HIGH
//LDR should be letting approx 4?volts passed on analog input
//digital input from pushbutton HIGH
// when servo opens initiate lock 10 minutes delay
//Permission to reset servo :
//Pushbuton released
// microswitch closed
Is this going to be realistic?
I will then need 2 digital and 1 analog inputs, and one ? output for the servo.
I also see that this topic has some code that is usable, just needs a bit of tweeking.
http://arduino.cc/forum/index.php/topic,144261.0.html