Let's Make Robots!

How to connect a light dependent resistor to a picaxe 28X1


I recently go a light dependent resistor

and i cant seem to figure out how to connect it to my picaxe28X1, would anybody here know how ???

Any help would be apreciated !!!!!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
thanks, will see if that helps
tryed it but i am not able to figur out how to connect th LDR, would need to see a pic something more detailed
I would assume that one pin goes to ground and the other to an input pin on your picaxe.
That diagram on page 62 of the manual, has one lead of the LDR connected to +5 volts. The other lead of the LDR is connected to a 10 K resistor. The other lead of the 10K resistor is connected to ground. The connection between the 10k and the LDR has a wire that goes to your ADC input if the PICAxe. (ADC1 in the example code). THe example appears to also have LEDs attached to ouputs 0 and 4, to show what the ADC is reading.

would the 10 K resistor be 1/2 W  or 1/4 W ?

this site sells them for a good price so... http://www.futurlec.com/ValuePacks.shtml

I have done exactly that, set up a voltage divider with an LDR and 10K resistor. It works fine for me and is quite easy to build on the end of the ribbon cable, which has connections to +5V and ground as well as the inputs.
so, a 10K resistor would be : Brown, Black, Red ?
No, brown, black orange. 10K = 10.000. The first two digits are determined by the first two rings, brown = 1, black = 0. The last ring is the multiplier, in this case 3, because 10^3=1000, and 3 is orange. See http://n1ofz.connares.org/resources/resistor_code.gif
What does the resistor do?