WEBVTT

00:00.150 --> 00:06.490
This is that five of the final project in this state, well, that's going to be quite quick and easy.

00:06.510 --> 00:14.810
We are simply going to initialize the LCD screen and print a welcome message for the user for one second,

00:14.820 --> 00:16.540
OK, when we start the application.

00:16.980 --> 00:26.460
So first, I will need to include the library, which is liquid crystal dot h.

00:27.520 --> 00:33.740
Because I'm going to include libraries at the very top of the program, then I need to initialize some

00:34.020 --> 00:34.470
things.

00:34.510 --> 00:35.800
So let's do that here.

00:35.850 --> 00:51.220
Define so exiting out this thing, which is for me a defined scd e pin, which is a form defined as

00:51.240 --> 00:53.130
CD and then default pin.

00:54.580 --> 00:58.870
And we need DeFore and we saw the five.

01:00.080 --> 01:09.590
And we need the six and seven, which are things number six, seven.

01:10.520 --> 01:20.690
Eight and nine, so that the six pins I need for initializing the LCG, let's initialize it here, so

01:20.690 --> 01:22.130
let's create the density.

01:23.150 --> 01:28.850
So I need to do liquid crystal, the same name as the library.

01:28.850 --> 01:34.820
And then let's name this LCD and I need to give six.

01:35.980 --> 01:37.720
Beans first the R.

01:37.770 --> 01:41.110
S, then eat and then defore.

01:43.070 --> 01:50.690
And then let's go back to a new line to make it nicer to read the five, the six.

01:54.520 --> 01:57.700
Discipline, close, parentheses, semicolon.

01:58.660 --> 02:03.180
All right, now we have LCD, we don't need to worry about that anymore.

02:03.220 --> 02:04.630
Let's go to the.

02:06.000 --> 02:15.030
Void setup function now in the void setup, I can do Cazale begin that's initialized here, LCD that

02:15.540 --> 02:18.660
begin with 16 by two.

02:20.480 --> 02:26.840
So then I initialize all the pins, OK, and attach, interrupt and everything, what are you going

02:26.840 --> 02:32.120
to do at the end of the setup is do see that print?

02:32.480 --> 02:38.450
So if I do, I print the cursor is right now at zero and zero, so I don't need to set it.

02:39.940 --> 02:41.990
And let's take initializing.

02:46.290 --> 02:51.990
OK, and then what I'm going to do is to wait for one second, so I'm going to add a delay here, which

02:51.990 --> 02:53.880
is the easiest way to do that.

02:55.410 --> 02:57.900
And then and that clear.

02:59.760 --> 03:06.760
OK, so, again, as I told you before, using delay in the setup may be OK not too long.

03:06.790 --> 03:09.990
OK, for example, once again, two seconds, three seconds.

03:10.530 --> 03:15.480
If you need to wait for something, that's not a problem because any way to set up will be called only

03:15.480 --> 03:15.800
once.

03:16.110 --> 03:18.070
And here is the fate behavior.

03:18.090 --> 03:22.190
OK, but let's say you need to initialize some communication with the sensor.

03:22.200 --> 03:25.980
You need to wait, for example, for five hundred milliseconds.

03:26.250 --> 03:31.950
Then you can print something initializing and then when the communication is ready, then you just,

03:31.950 --> 03:35.050
for example, clear the screen and then you can go to the loop function.

03:35.520 --> 03:41.010
So it's just to show you what you can do, for example, to give some clue to the user that the application

03:41.010 --> 03:44.070
is starting and waiting for something to be said.

03:44.460 --> 03:46.720
And also using that here will be quite nice.

03:46.740 --> 03:51.510
OK, when we start the application, we have a welcome message or one signal and then the application

03:51.510 --> 03:51.900
starts.

03:52.680 --> 03:56.730
So now let's see, let's verify.

03:57.000 --> 03:58.770
We find projects that.

03:58.850 --> 03:59.470
No.

04:02.810 --> 04:03.350
S..

04:06.040 --> 04:10.810
OK, not any problem, let's check if it's working, let's upload the code.

04:14.330 --> 04:17.330
And you can see initializing and then stop.

04:17.600 --> 04:24.770
OK, so whenever there is a problem here, there is a button we have initializing for one second and

04:24.770 --> 04:29.750
then you can see the application starting with the Yellowhead, which starts to blink.

04:30.400 --> 04:30.820
All right.

04:30.830 --> 04:34.130
So that is the end of this step, which was actually quite small.
