From the course: Learning Arduino: Interfacing with Analog Devices

Wiring up our LDR circuit - Arduino Tutorial

From the course: Learning Arduino: Interfacing with Analog Devices

Start my 1-month free trial

Wiring up our LDR circuit

- [Instructor] Okay, so in order to wire the LDR we are going to use the second arrangement from the previous video. Where whenever it gets darker, we receive less voltage. So the very first thing I'm going to do is I'm going to connect the voltage in and the ground from the Arduino board. We are using the five volt from the Arduino and then I'm going to connect it to the breadboard here. And then for our LDR, I'm going to connect it around 140. You can pretty much add it anywhere in the breadboard. And I'm going to use a 1K resistor where the colors are brown, black, red. And I will connect it to the LDR here. Alright, so for this second arrangement, the voltage comes in from five volt to the LDR. So this one side of the LDR goes to the five volts. And then the other side of the resistor goes to ground. Now in order to read the value of the LDR, we connect between the LDR and the resistor. And then I'll connect that to A0. which is the analog input zero. The last step is just connecting the Arduino board to the computer.

Contents