WEBVTT

00:00.180 --> 00:03.510
And let's add the photoresistor essential to our secret.

00:04.010 --> 00:10.830
I'm going to start from the previous Sigrid's, which contains I asso infrared remote control that I'm

00:10.830 --> 00:12.240
going to duplicate.

00:15.170 --> 00:20.030
OK, and let's name it photo array, the store.

00:22.080 --> 00:27.390
All right, so that is the last thing we are going to add to our circuit so you can search here on the

00:27.390 --> 00:33.120
right in the least photo array store, you would find this should look like this.

00:33.480 --> 00:34.410
They can take it.

00:34.710 --> 00:40.800
And you can see we just have two things he tinker, can I have terminal one?

00:40.810 --> 00:41.400
Terminal two.

00:42.000 --> 00:50.460
So what I'm going to do simply I'm going to take this photoresistor and put it on so each leg of the

00:50.460 --> 00:53.340
photo result on a different line.

00:53.370 --> 01:00.240
OK, on the breadboard so far, I photoresistor all just like for a still actually there is no plus

01:00.240 --> 01:01.550
or minus side.

01:01.560 --> 01:04.740
OK, the direction of the component here doesn't matter.

01:05.010 --> 01:09.420
So what we are going to do first connect to the ground and to connect to the ground, we are going to

01:09.420 --> 01:20.160
take one leg of the photoresistor and first, but also restore and we take this and this will be a 10

01:21.210 --> 01:21.820
resistance.

01:21.840 --> 01:24.590
So just like the one we used for the push-Button.

01:26.350 --> 01:33.640
So this is brown, black and orange with a full bench crystal, and I'm going to put this here.

01:35.020 --> 01:43.390
So I can one leg of the photoresistor to the stool and then the other side to the ground, which is

01:43.400 --> 01:52.200
deadline and back and then the other side of the photoresistor, I'm going to connect it to five volt

01:52.960 --> 01:53.490
with Ray.

01:54.330 --> 02:01.110
So as you can see, the setup is really quite similar to the setup of the pledge, but we have one leg

02:01.110 --> 02:06.540
connected to Five-fold and the other one connected to the ground via a 10 kilometer storm.

02:06.630 --> 02:09.930
And now how are we going to get some data from this sensor?

02:09.960 --> 02:17.100
Well, we need to connect one piece of the arena to one leg of the photoresistor.

02:18.180 --> 02:19.500
What kind of do we need?

02:19.500 --> 02:26.040
We need an analog pin because we are going to read an analog value from the photoresistor.

02:26.310 --> 02:31.650
Actually, photoresistor is quite similar to a potential where the difference is that potentiator.

02:31.890 --> 02:38.730
Well, you are going to manually move the button here to change the value you read with analog pins

02:39.420 --> 02:39.680
here.

02:39.690 --> 02:42.810
The value would change depending on the luminosity of the room.

02:43.080 --> 02:49.830
So what I'm going to do, I'm going to take here once I'm going to take the leg, which is connected

02:49.830 --> 02:58.380
with the resistance on this line, going to take a wire to wire here and then go to.

03:00.130 --> 03:07.630
Analog being, let's say, analog being number zero eight zero, let's change the color.

03:09.190 --> 03:09.670
To.

03:10.790 --> 03:16.280
Arrange OK, looks good, you can a that looks good.

03:17.390 --> 03:25.110
So here I got a pin, so a zero connected to that pin of the photoresistor.

03:25.610 --> 03:34.100
So to recap, one of the pin here connected to five-fold the other pin with one wire going to a zero

03:34.340 --> 03:37.870
and then irresistable connected to Iran and that's it.

03:38.960 --> 03:42.520
And I'm just going to show you how you can interact with these sensor.

03:42.800 --> 03:44.180
So it's the same thing.

03:44.190 --> 03:48.620
Every other sensor, you just click on it and you can see you can set the luminosity here.

03:49.940 --> 03:55.130
So here you will get the max value, here you will get the lowest value.

03:55.460 --> 03:58.870
OK, so that's how you can fake the luminosity that.

03:59.930 --> 04:02.170
And here is the real how to set up.

04:02.210 --> 04:09.130
So, again, I have disconnected the first and then you can see the photoresistor is right here.

04:09.410 --> 04:13.650
And actually for this setup, I have just used one wire.

04:13.720 --> 04:14.840
OK, why is that?

04:14.850 --> 04:22.400
Because I have plugged directly one leg of the photoresistor to five volt line, as you can see here.

04:22.430 --> 04:29.690
So the right one, then another leg to one line of the breadboard and then from this line of the breadboard.

04:29.700 --> 04:36.260
So I have my wire here connected to a pin, number eight zero of them.

04:37.040 --> 04:45.410
And then I have one tenkile on resistor connected again from this line to directly the ground to here

04:45.410 --> 04:51.490
by directly plugging the components to five volt and directly plugging the register to the ground.

04:51.500 --> 04:53.120
I can save two wires.

04:53.570 --> 04:54.040
Right.

04:54.890 --> 04:56.930
And well, that's pretty much it for the circuit.
