WEBVTT

00:00.050 --> 00:03.260
Let's now add two more LEDs to our circuits.

00:03.260 --> 00:06.470
So now the circuits will have three LEDs and one push button.

00:06.470 --> 00:11.510
And we will be able to practice on more interesting stuff with Python and the Raspberry Pi.

00:11.510 --> 00:13.430
So here I'm back to the software and I have.

00:13.430 --> 00:16.820
So I have a green LED and a blue LED.

00:17.120 --> 00:18.410
It doesn't really matter.

00:18.410 --> 00:23.990
You can choose any color you want okay I'm just using three different colors, but just pick the whatever

00:23.990 --> 00:26.120
LED that it's available for you.

00:26.120 --> 00:29.720
And on top of that I also have one kilo ohm resistor.

00:29.720 --> 00:31.910
So I have one for each LED.

00:31.910 --> 00:36.830
And the circuit is basically going to be the same for the three LEDs.

00:36.830 --> 00:41.960
So let's start for example with this blue LED I'm going to put it here somewhere here.

00:42.140 --> 00:47.870
And I will connect the shorter leg to the ground okay.

00:47.900 --> 00:50.480
So maybe just put it here so it looks nicer.

00:50.480 --> 00:52.070
And I connect to the ground.

00:52.070 --> 00:55.310
And this wire I'm going to set it to black okay.

00:55.340 --> 01:02.780
I'm gonna also place that one right now just right here for example, and connect the ground with the

01:02.780 --> 01:07.810
shorter leg, and we don't need to add anything else because the ground you can see is already connected

01:07.810 --> 01:08.950
to the Raspberry Pi.

01:08.980 --> 01:12.940
So this line is already fully connected to the ground.

01:12.970 --> 01:21.910
Then I will add my resistor on the longer leg of the LED here, and also on that one.

01:22.720 --> 01:25.930
And now which Gpio are we going to use.

01:25.960 --> 01:28.570
Well I have created this setup.

01:28.570 --> 01:30.550
So that is going to be quite easy for you.

01:30.580 --> 01:33.670
You see we are using the Gpio number 17 here.

01:33.670 --> 01:37.960
But then we have the Gpio number 27 and 22.

01:37.990 --> 01:40.660
So we're going to connect this blue LED here.

01:40.660 --> 01:50.020
So after the resistor we take this side of the resistor and we connect it to this Gpio number 27.

01:50.650 --> 01:55.600
I'm going to use for example I'm going to use the green cable because that's what I'm going to use for

01:55.600 --> 01:56.710
my real circuit.

01:56.740 --> 01:57.130
Okay.

01:57.130 --> 02:01.390
And I'm going to also make it look nicer for the image.

02:01.390 --> 02:09.300
And then I'm going to connect that side of the resistor here to this Gpio here number 22.

02:09.330 --> 02:13.950
And I have a white wire here.

02:14.220 --> 02:14.460
Okay.

02:14.460 --> 02:17.760
To match the one that I'm using for my circuit.

02:17.940 --> 02:19.440
And for example just like that.

02:19.470 --> 02:26.910
One thing to pay attention to here is that this pin here is actually a 3.3V pin.

02:26.910 --> 02:31.500
So this is a power pin which means pay attention to that don't power.

02:31.650 --> 02:35.970
So don't connect the LED to that 3.3V pin directly.

02:35.970 --> 02:40.170
So make sure that you use this Gpio 27 and 22.

02:40.200 --> 02:43.410
It's quite easy to find if you have correctly placed the ground here.

02:43.440 --> 02:49.320
It's just the well the first, second and third pin on the right for the three LEDs.

02:49.350 --> 02:49.920
All right.

02:49.920 --> 02:51.330
And the circuit is complete.

02:51.840 --> 02:53.550
And back to the real circuit.

02:53.550 --> 02:55.350
So I have shut down my Raspberry Pi.

02:55.380 --> 02:59.550
Of course I have taken out the power cable if needed.

02:59.550 --> 03:02.040
You remove the SD card if you don't have a case.

03:02.070 --> 03:02.610
Okay.

03:02.610 --> 03:04.920
And I'm gonna start with my.

03:05.190 --> 03:10.680
So I have my two LEDs here green, green and blue.

03:10.770 --> 03:14.040
I'm going to put so pay attention here.

03:14.040 --> 03:17.520
You see we have a shorter leg.

03:17.520 --> 03:19.980
So the shorter leg is going to go to the ground.

03:19.980 --> 03:23.100
So I can do the same thing I did for the red LEDs.

03:23.100 --> 03:30.150
For example, I connect here shorter leg to the ground and the longer one to another column.

03:30.840 --> 03:34.500
I do the same thing for the green LED.

03:34.590 --> 03:42.630
So shorter leg here goes to the ground and then the other one goes to another column.

03:43.050 --> 03:46.020
I take now my two resistors.

03:47.160 --> 03:56.670
Okay so the one kilo ohm resistors one goes here on that side of the LED to another.

03:56.670 --> 03:59.100
I'm going to choose here for example whatever.

03:59.250 --> 04:01.230
So to another column.

04:01.230 --> 04:05.430
And I do the same for that one okay.

04:05.460 --> 04:09.540
Make sure it's on the same column as the longer leg of the LED.

04:09.540 --> 04:12.530
And the other one can be right here.

04:13.010 --> 04:13.730
Okay.

04:14.450 --> 04:16.310
And then I'm going to take my.

04:16.340 --> 04:18.020
So I have a green cable here.

04:18.050 --> 04:21.890
That is a male to female okay.

04:21.920 --> 04:33.020
That I'm going to plug between that leg of the resistor here to the pin that's directly on the right

04:33.020 --> 04:34.310
of the first LED.

04:34.310 --> 04:39.050
So I don't really I can't really make any mistake here if it's correctly placed already.

04:39.920 --> 04:50.390
And then I take my last wire, which is another male to female that I plug between that LED and between

04:50.420 --> 04:52.730
that pin right here on the right.

04:53.420 --> 04:59.630
So now you can see I have my ground and then I have the yellow, the green and the white cables.

04:59.660 --> 04:59.930
Okay.

04:59.960 --> 05:01.070
And the circuit is complete.

05:01.070 --> 05:07.400
So you see after you know how to put one led if you need to put more LEDs, it's really simple.

05:07.400 --> 05:12.650
And now you can power on the Raspberry Pi again and connect to the desktop.

05:12.650 --> 05:15.500
And Tony to write more Python code.
