And I know it's quite a lot of videos before we actually do the circuit, but there were a few things
that you needed to know before you can do anything.
Don't worry, because after this section, when we continue to work on the circuit, we won't need to
do any setup and we will be able to dive directly right in.
So when I do a circuit or if I improve the current one, I will first use this software tool here to
design the circuit.
And then I will also show you in the same video the real circuit on my real breadboard and Raspberry
Pi for each circuit.
Also on the corresponding lesson, you can download the image of the circuit that I'm doing here, so
I recommend you to watch the entire video before you start the circuit by yourself.
And just a quick parenthesis before we start.
So I'm using this software because it will be easier to explain.
Okay.
The name is called Fritzing.
You can find it online if you want.
You absolutely don't need this.
Okay, here's the website of fritzing.org.
As you can see now it is paid.
So if you want this tool you have to pay here about 10 USD.
I'm using a previous version that was free at the time, but anyway, it was just to show you the tool
I'm using.
You absolutely don't need this tool.
Okay, I'm just using it because I think it's a better teaching experience.
And anyway, you can download the image.
Okay.
With this lesson you can download the image with the secret.
So don't worry about that.
So let's start the secret.
Here I have my breadboard okay I have my Raspberry Pi.
I have an LED okay.
And I have my one kilo ohm resistor.
As you can see here, I have brown, black and red because it's a four band resistor.
And then the tolerance here doesn't really matter.
And so the first thing we are going to do is to actually connect the ground.
So for the ground in the breadboard we will use that line here that blue line.
And then what pin will we use on the Raspberry Pi.
Well you will have.
So you see we have two different lines of Gpio okay.
So we have 20 here and 20 there.
We're going to go to the line that's closest, that's on the inside of the Raspberry Pi.
And we're going to count to five.
So one, two, three, four and five.
This here this is a ground pin.
Okay.
So I'm just going to take my wire and connect it to that line on the first.
On the second it doesn't really matter.
And I can just do that.
Okay I make it look nicer when I take the screenshot.
And I'm just going to use a black wire.
Okay.
We use black usually.
Okay.
That's the convention for ground.
We use black.
So you know that when you see a black wire this is for the ground.
So we don't make any confusion.
Okay.
And you could connect this to any pin.
Okay.
As you can see any pin on that line they are all connected together.
So it doesn't matter.
Okay.
So now the ground of the breadboard here and the ground of the Raspberry Pi are connected together.
Good.
Now we're going to take our LED.
And you can see that the LED has two legs, but one of them is shorter than the other one.
So the short side is going to be the negative side and the long side.
So the long leg is going to be the positive side.
So here I'm going to put my uh LED here on the circuit.
I'm going to go a bit more on the left.
So we have more space for the following.
And I'm going to connect the shorter leg to the ground.
So how to do this.
As you can see here, all those dots here are connected vertically.
So I will take one of the dots.
So for example that one or that one or that one and just connect it to the ground with a black wire
here.
So ground is connected here and is connected there on the other side of the LED.
So on the longer leg I will take my resistor.
And I told you previously about the correct way to read the resistor from which side to start.
But when you connect this resistor to a circuit there is no positive or negative side.
Okay.
You can just take your resistor and connect one leg to the positive side here of the LED and another
leg that you connect to any other dot.
Here you can see that on a different column.
And then to close this circuit well we are going to connect that side here of the resistor to this pin
right here.
So the one next to the ground that is called Gpio 17.
So you can see here on the image we want the Gpio 17.
And so there are two ways to represent pins.
You can see we have the gray numbers with 12345 etc..
So the GND here would be the pin number nine.
And this one would be the pin number 11.
But we're going to use the alternate names.
So here it's going to be GND.
And this one is going to be Gpio 17 okay.
That's going to be important for when we write the code.
And just.
Okay I see here it's Raspberry Pi four model B, I'm using a Raspberry Pi five, but the Gpio panel
is the same between those two Raspberry Pi boards.
So for the circuit it doesn't matter here okay.
So don't be confused with this name.
So what I will do is I will take this Gpio and connect to that here that leg of the resistor and use
a I'm going to use a.
So here I'm going to use a yellow cable.
So make sure you don't use black for this.
And also don't use red but you can use any color you want okay.
So in the end the circuit is complete.
You can see we start from the ground.
We go here.
Ground is connected to the shorter leg of the LED then goes through the LED.
The longer leg is connected to one side of the resistor.
The other side of the resistor is connected to this Gpio number 17 and the circuit is complete.
So double check especially the connection you make here okay.
Double check that everything is correctly placed.
And here is the real circuit.
So what do I have here?
I have my Raspberry Pi first with the with the case, you might not have a case.
So first make sure that you unplug.
Okay.
The Raspberry Pi.
So it's powered off completely.
If you don't have a case I would recommend to remove the SD card.
Okay.
And then plug it back at the end here because the case is protecting it I can leave it there.
Okay.
And I have some space here to plug the wires for the Gpio panel.
So I'm going to use the case as is.
Okay.
That's not going to be a problem.
I have my breadboard and then I have a black wire.
I also have a yellow wire.
So those two are male to female wires I have my LED which you can see has a shorter leg and a longer
leg.
Okay.
So the shorter leg here is on the left.
And then I have my resistor.
So the resistor I just showed you before what.
Either side okay.
It doesn't matter.
You can plug any side where you want.
It doesn't have any direction.
So I will start with the ground and plug the ground.
So I will count here one, 2345 on the inside.
Okay.
So 12345.
Again I make sure that it is plugged to the right place.
And then I will start for example here plug on that minus line.
So now the ground is connected.
Great.
I will take my LED.
And what I did what I did in the, in the software is that I just plug the LED like this for example
between two between two columns.
And then I have another black wire between the shorter leg and the minus line.
But what I can do here is going to be simpler is I'm just going to put directly the shorter side.
So the shorter leg directly on the ground just like that.
And then plug this one like this.
Okay.
So you can see the shorter leg is directly on the ground, and the longer leg is in another column here
in the breadboard.
So that's the same thing.
We just save one wire that we don't really need for that.
Then I will take my resistor and plug it between that leg of the LEDs.
So make sure it's on the same column and on another column.
So I'm just going to do like this.
Okay.
You can see here how the resistor.
And finally I'm going to take this wire.
So it could be any color.
Just avoid black and red because black is going to be used for ground and red for power.
So we try to keep this consistent.
But then for other connections it doesn't really matter.
And I'm going to connect.
So one side of the resistor here.
So the same column to the Gpio number 17 which should be just right to the ground.
So that's going to be that one here.
Okay, so I check again 12345 on the inside for the ground and then six for the, uh, wire here.
And the circuit is finished.
You see, I have put everything at the top here on one short part of my breadboard, so I have enough
space for all the other LEDs and push buttons and other stuff we're going to add later.
Okay.
And to recap, so we have the ground going here.
And then the shorter leg of the LED is connected to the ground.
The longer leg is connected to another column that is also connected with one side of the resistor.
And then the other side of the resistor is connected to Gpio number 17 and the circuit is done.
So now you can put the SD card back if you removed it and put the case back, everything back.
And we can now plug the Raspberry Pi again.
It's going to boot.
And now we can program our Gpio and program our LED.