In this lesson, we are going to setup the hardware on breadboard. We are going to user LDR(Light Dependent Resistor) along with an LED and then we are going to control the intensity of the LED automatically using LDR. And thenl program Arduino such that it will light the LED and it will glow at maximum when the intensity of external light is more and it will dimmer the LED at if the intensity of external light is less. Gather the necessary components. If you are directly seeing this tutorial, you can go to "Getting Started with Arduino" to start from beginning and details of bill of materials. So Let's start.
And yes, keep this circuit diagram handy. And tally your breadboard circuit with this circuit diagram.
- Now, I am assuming that you are following step wise procedure. If you are directly here, then you can take this tutorial to know the previous steps before this chapter. So, after "Blinking LED" program, your breadboard might look like this.
2. Now follow these connections carefully and tally it along with the circuit diagram.
- From "A0" of Arduino Leonardo Micro, connect a 10K resistor to +ve terminal of breadboard.
- The Resistor should be dispersed in the +ve terminal of breadboard strip.
- Connect the gnd terminal and insert it in the following way.(Don't get confused with the black wire getting connected to nowhere. We will place LDR here in next step.)
3. Now place the LDR like show in the below image. LDR does not have polarity, so it doesn't matter which legs are going into which terminal. Just place it like shown below.
Congratulations! Now you have completed the circuit on breadboard. The next step is to write program for that and see the output.