b) Go to your profile, and fill in at least a vague indication of where you are. For the breadboards, the suppliers will mail them anywhere in the world for a sensible price, although your local authorites may make a nuisance of themselves. In the UK, about 9 parcels in 10 go through with no hassle.
c) You need to connect the LDR and a fixed resistor. Covered at....
Connect analog port of Arduino to * in the middle
The valueof resistor must be in the same order as the LDR when in the dark. (a 10 K will work probably too)
So, one end of the LDR goes to a +5vdc pin, one end of the resistor goes to a ground pin. Now the problem, the other ends of both the LRD and resistor must connect to the analog input pin you are using. As usually two wires won't fit into one pin hole, and you don't want to use a breadboard, then you must solder the connection between the LRD and resistor and then add a single wire from that junction connection to the analog input pin.
Good for you I hate those things, they are more trouble than they are worth.
I always solder stuff up an a small piece of strip board. If you keep the wires long you can always use the components again.
The thing to remember is that physically you can make the topological arrangement of components any way you like. What is important is that they are all connected electrically in the right way. You tell that from a schematic.
So, one end of the LDR goes to a +5vdc pin, one end of the resistor goes to a ground pin. Now the problem, the other ends of both the LRD and resistor must connect to the analog input pin you are using. As usually two wires won't fit into one pin hole, and you don't want to use a breadboard, then you must solder the connection between the LRD and resistor and then add a single wire from that junction connection to the analog input pin.
I have got a breadboard, but with no resistor, do I have to get one, why?
Yes, you have to, there should be a flow from + to GND and the Arduino measure the voltage drop. - Voltage divider - Wikipedia -
If you connect the LDR to 5V and the other end to the Analog in the voltage will allways be 5 Volt as there is nothing that pulls it to GND level.
You have to form a voltage divider and take your reading from the centre (the * in the above drawing). Without two resistors (the LDR is just a special type of resistor) you are just pulling the Arduino pin low and so will always read a value of 0.
Now if for some reason you live in outer mongolia and can't get a resistor and just want to play to see what happens there are two ways to do this.
If you have a second LDR use that instead of the fixed resistor, as you light and shade either of the LDRs the reading will change.
Use the internal pullup resistor instead of the external resistor (I'm pretty sure this will work with an analogue input).
Both these methods will be very imprecise but will at least allow you to have a play.
Does anybody can post a simple Fritzing wiring diagram. I think people will be able to better understand what you mean by creating a power divider and taking the input from the middle. Thanks a lot!
Is that a proper connection for the LDR TinkerKit sensor? I think I am getting the right reads as they vary from 20 to about 900 when put under light bulb. Resistor shown is a 10k resistor. Thank you in advance.
Everybody in all of the previous posts were saying that i need it, and without i was getting 0 as an output read, so i am guessing i need it. This set up seems to be working properly. After mapping the results from 0-1023 to 0-255 it seems to be getting me proper ranges. Why are you saying that i dont need that resistor?
It works just fine. I hooked up a servo to it and mapped the output from ldr from 0-1023 to 0-180 and now depending on how much light falls on that sensor it adjusts servos position....its pretty sweet. Thanks for the help.