johnbroach:
What I meant was, that when there is no light reaching the photoresistor, the value that it has is 900 approximately, and when i bend my finger a little bit, the value that I get from the photoresistor is 800 and the last value is 260 when the led is so close to the photoresistor(all in the serial monitor of Arduino)
Hi,
Have you got this happening?
Have you got those sort of values as you move from far to closest approach now, or do you wish that those values happen?
Have you got a glove setup with one LDR and LED to do a proof of concept.
How are you going to make sure the LED on one finger does not effect the LDR on another as you move your fingers.
To simply "map" the LDR values to 0 to 180 or what ever range of servo movement you need, look at the map function.
Also you will need a to look at how much power you need for the servos.
Tom.. ![]()