WEBVTT

00:00.210 --> 00:08.130
Let's start by adding to our secrets, so then you would be able to use it with digital pens set up

00:08.130 --> 00:14.520
as input means, I'm going to show you exactly what to do in Tinker Card and then you can follow the

00:14.520 --> 00:17.160
exact same step that you do a real secret.

00:17.170 --> 00:18.480
And I will show you the results.

00:18.510 --> 00:24.770
Also, with the real secrets that we are not going to start an empty project here, we're going to use

00:24.810 --> 00:26.480
what we already had before.

00:26.490 --> 00:31.250
OK, so every time we add a new component, we are going to do it in an iterative way.

00:31.620 --> 00:35.400
So we have all the components that we have added before, plus the new one.

00:36.150 --> 00:40.700
So here what you can do here, we have our LG Sigrid's.

00:41.040 --> 00:46.920
You can click on these settings here and click on Duplicate.

00:49.850 --> 00:55.670
Now, we are not going to modify directly any secrets, we create a new one, OK, which is a copy of

00:55.670 --> 01:00.930
aready, let's name it Bush Button, OK?

01:00.980 --> 01:04.740
And we are going to get the budget done right here in this secret.

01:05.080 --> 01:11.440
So the first thing we can see is that we already have the connection between the ground of the original

01:11.450 --> 01:12.810
and the ground here.

01:13.220 --> 01:16.010
This line that we set up as the ground of the preborn.

01:17.720 --> 01:24.090
But I'm going to add the power button here on the right, and you can see here on the list of components,

01:24.090 --> 01:26.030
we already have Berbatov here.

01:26.310 --> 01:30.420
But as a to if you don't have it, you can directly search for it.

01:31.350 --> 01:37.620
I take my push button, I put it there, and then we will also need a racist or.

01:38.930 --> 01:48.550
OK, taking register and these register will be a 10 kiloton raised kilo here and then here.

01:48.980 --> 01:53.120
And as you can see, we have brown, black and orange.

01:54.320 --> 02:01.460
I'm going to make it rotate like this, all right, and that's all the components we need, plus the

02:01.460 --> 02:05.770
different wires, OK, but the wires, we are going directly to create it from the bone.

02:06.410 --> 02:08.810
That's all the components we need for the circuit.

02:10.180 --> 02:18.340
What we're going to do is take the then and place it here between the two sets of lines here on the

02:18.340 --> 02:18.970
BRADBOURN.

02:20.450 --> 02:25.810
So you have one leg here, one leg, see another one here and another one here.

02:28.430 --> 02:36.350
We are going first to connect this push button to the ground and to do that, we are not going to directly

02:36.350 --> 02:39.200
connect to the ground, but we are going to register.

02:39.750 --> 02:43.510
OK, I'm going to explain just after why we had to register here.

02:44.240 --> 02:53.540
So on this link here, you can connect one register and then connect the other leg of the register here

02:53.540 --> 02:54.430
to another line.

02:54.860 --> 02:59.750
And then I'm going to take this and connect to the ground.

02:59.760 --> 03:01.810
So make sure this is the ground line, OK?

03:01.910 --> 03:02.390
Yes.

03:02.390 --> 03:03.440
This is the ground nine.

03:05.020 --> 03:11.830
I'm going to put this in black, because this is the common ground and that's the first connection we

03:11.830 --> 03:18.820
need to know the Syrian connection is we need to connect this leg, OK, on the other side of the button

03:19.240 --> 03:22.870
to the five-fold supply of the Ardino.

03:22.880 --> 03:25.990
So we can see here we have a five world supply.

03:26.890 --> 03:35.500
And instead of just putting a wire like that to fibrotic would do this, OK, but instead I'm going

03:35.500 --> 03:37.960
to connect the five five-fold air.

03:41.340 --> 03:42.450
The plus.

03:43.410 --> 03:43.880
Line.

03:43.920 --> 03:48.040
OK, so I'm going to carry it and we'll the color, right?

03:48.060 --> 03:51.560
OK, Red is the convention for power supply.

03:51.840 --> 03:56.630
So I'm going to use the right only for power supply and not for anything else.

03:57.150 --> 04:02.850
And I recommend you do the same black and red ground and power supply.

04:03.540 --> 04:10.020
The five volt here goes directly to this line, which means that now all this line.

04:11.300 --> 04:16.670
Is connected to Facebook, and you will see in the following of these girls, we actually need to connect

04:16.670 --> 04:19.260
multiple components to the power supply.

04:19.520 --> 04:21.260
So this line will be dirigiste.

04:22.130 --> 04:31.310
So what we can do and we need to take one dot from this line, any dots and connect it to the line of

04:31.310 --> 04:38.260
the five to make sure that you don't connect it to the ground, but to the line of fire and.

04:38.270 --> 04:38.890
But it good.

04:38.900 --> 04:39.880
All right.

04:40.760 --> 04:46.760
OK, so you can see by using the different colors, red and black, we can easily make the difference

04:46.760 --> 04:48.640
between ground and five-fold.

04:48.950 --> 04:53.000
So in the future we will make much less mistakes.

04:53.240 --> 04:53.630
All right.

04:53.640 --> 04:58.960
So we have this been connected to ground we've with on this been connected to by vote.

04:59.270 --> 05:07.130
Now I'm going to take the pin, which is on the other side here of the button on this side, which also

05:07.130 --> 05:10.060
corresponds to the side of the ground.

05:10.730 --> 05:12.970
And I'm going to take one dot.

05:12.980 --> 05:17.780
So let's say this one and I'm going to connect it now to.

05:19.070 --> 05:20.230
Digital bin.

05:21.280 --> 05:22.180
No.

05:22.450 --> 05:27.610
Two, like in the square like these.

05:28.760 --> 05:30.420
OK, that's better.

05:34.220 --> 05:41.930
So with this being number two, we are going to be able to read the state of the push button and right

05:41.930 --> 05:43.670
now the secret is now finished.

05:43.670 --> 05:45.690
And just why did I?

05:45.710 --> 05:49.160
D register here connected to the ground?

05:49.910 --> 05:52.760
Because this is actually not mandatory.

05:53.150 --> 05:58.570
This register will act as what we call a pulldown register.

05:58.850 --> 06:00.530
What is a pulldown register?

06:00.670 --> 06:05.870
Well, well, you just have a curtain here and you have so ground and power supply.

06:05.870 --> 06:09.980
And then you read the state from that in the state of the button.

06:10.000 --> 06:16.850
So the voltage that is applied to the button may be floating, which means that it can be anywhere from

06:16.850 --> 06:24.800
zero to five volt and the voltage will continuously change by adding this register here connected to

06:24.800 --> 06:25.350
the ground.

06:25.670 --> 06:32.200
What we do is we force the default state of the button to be low.

06:32.210 --> 06:37.700
So to be zero volt and you could do the same thing with a pull up register.

06:37.780 --> 06:43.370
So instead of creating a register, go to the ground, you will connect it to the power supply.

06:43.370 --> 06:50.480
And then instead of using this line for the digital thing, you would use the other one and thus will

06:50.480 --> 06:55.410
describe the default state for the push button will be high five.

06:55.530 --> 06:55.790
OK.

06:56.120 --> 07:05.150
OK, so here by doing this, so we pull down resistor to zero volt when we read the stage for the push

07:05.150 --> 07:05.600
button.

07:05.900 --> 07:12.290
When the button is not pressed, we will read the state level and when the button is priced, we need

07:12.290 --> 07:19.460
to rate the state high and we don't need to worry about the voltage here floating between two numbers.

07:20.740 --> 07:27.360
All right, and this is the real hardware circuit, so make sure that you just connect the world to

07:27.370 --> 07:33.160
at least one of the two parts of the U.S. cable here just from completely.

07:33.550 --> 07:35.800
And then so we have.

07:36.760 --> 07:38.000
When do we have a secret?

07:38.500 --> 07:43.810
We have our pushbutton here, which I've collected, just like in the Tinker Get simulation game between

07:43.810 --> 07:46.970
the two parts, between the two sections of the BRADBOURN.

07:47.380 --> 07:53.740
Then I have my in my down register, which is a tentative register.

07:54.130 --> 08:02.050
But as you can see here, instead of connecting the register between this leg of the button and another

08:02.440 --> 08:09.010
line and then adding a black wire, I just directly connected the restore between the ground and this

08:09.010 --> 08:09.790
leg of the register.

08:09.820 --> 08:13.410
OK, because this is very near.

08:13.870 --> 08:15.430
I can save the wire there.

08:16.120 --> 08:26.680
Then I have added here this wire, OK, between Kinsela Five-fold, King of the Arduino and this line.

08:26.710 --> 08:34.100
OK, so I have the ground to the ground and the five volt lines are not all this line here in red.

08:34.520 --> 08:43.090
It's connected to Five-fold and I have the small wire around wire between this line and this being able

08:43.100 --> 08:43.600
to button.

08:43.870 --> 08:46.570
And finally here on this.

08:47.580 --> 08:50.290
Side, OK, which is the same side as the ground side.

08:51.000 --> 08:52.290
I have another way out.

08:52.320 --> 08:54.270
So I chose Green as well.

08:54.660 --> 08:58.110
Another wire that is connected between this bin and.

08:59.450 --> 09:01.620
He had been number two of the.

09:03.930 --> 09:10.230
All right, I know you have your attorney here and the president here and the two lines of the plus

09:10.230 --> 09:15.720
and minus line are connected respectively to the Bible and to the grand.
