I was thinking of there is a way for arduino to move a servo around when the ldr inputs light to the arduino. And if the ldr is covered to not move the servo. thanks!!
You can hook the LDR up to an analog input, read the value with Analog Read(), and depending on the value move the servo or not.
yeah i know that but i need some code or examples
yeah i know that but i need some code or examples
There is a tutorial on connecting an LDR to an arduino here that has an example sketch: http://webzone.k3.mah.se/projects/arduino-workshop/projects/arduino_meets_processing/instructions/ldr.html
If you are using version 0012 of the arduino that has just been release you will find a couple of example sketches for the servo library included with that release. You don't say what your experience level is but if you are just starting with the arduino you may want to get each of them working separately, after that it should be easy to understand how to combine the functionality.
There are plenty more relevant examples to be found with a google search if you need them
Have fun!