And let's add the photoresistor essential to our secret.
I'm going to start from the previous Sigrid's, which contains I asso infrared remote control that I'm
going to duplicate.
OK, and let's name it photo array, the store.
All right, so that is the last thing we are going to add to our circuit so you can search here on the
right in the least photo array store, you would find this should look like this.
They can take it.
And you can see we just have two things he tinker, can I have terminal one?
Terminal two.
So what I'm going to do simply I'm going to take this photoresistor and put it on so each leg of the
photo result on a different line.
OK, on the breadboard so far, I photoresistor all just like for a still actually there is no plus
or minus side.
OK, the direction of the component here doesn't matter.
So what we are going to do first connect to the ground and to connect to the ground, we are going to
take one leg of the photoresistor and first, but also restore and we take this and this will be a 10
resistance.
So just like the one we used for the push-Button.
So this is brown, black and orange with a full bench crystal, and I'm going to put this here.
So I can one leg of the photoresistor to the stool and then the other side to the ground, which is
deadline and back and then the other side of the photoresistor, I'm going to connect it to five volt
with Ray.
So as you can see, the setup is really quite similar to the setup of the pledge, but we have one leg
connected to Five-fold and the other one connected to the ground via a 10 kilometer storm.
And now how are we going to get some data from this sensor?
Well, we need to connect one piece of the arena to one leg of the photoresistor.
What kind of do we need?
We need an analog pin because we are going to read an analog value from the photoresistor.
Actually, photoresistor is quite similar to a potential where the difference is that potentiator.
Well, you are going to manually move the button here to change the value you read with analog pins
here.
The value would change depending on the luminosity of the room.
So what I'm going to do, I'm going to take here once I'm going to take the leg, which is connected
with the resistance on this line, going to take a wire to wire here and then go to.
Analog being, let's say, analog being number zero eight zero, let's change the color.
To.
Arrange OK, looks good, you can a that looks good.
So here I got a pin, so a zero connected to that pin of the photoresistor.
So to recap, one of the pin here connected to five-fold the other pin with one wire going to a zero
and then irresistable connected to Iran and that's it.
And I'm just going to show you how you can interact with these sensor.
So it's the same thing.
Every other sensor, you just click on it and you can see you can set the luminosity here.
So here you will get the max value, here you will get the lowest value.
OK, so that's how you can fake the luminosity that.
And here is the real how to set up.
So, again, I have disconnected the first and then you can see the photoresistor is right here.
And actually for this setup, I have just used one wire.
OK, why is that?
Because I have plugged directly one leg of the photoresistor to five volt line, as you can see here.
So the right one, then another leg to one line of the breadboard and then from this line of the breadboard.
So I have my wire here connected to a pin, number eight zero of them.
And then I have one tenkile on resistor connected again from this line to directly the ground to here
by directly plugging the components to five volt and directly plugging the register to the ground.
I can save two wires.
Right.
And well, that's pretty much it for the circuit.