This is that five of the final project in this state, well, that's going to be quite quick and easy.
We are simply going to initialize the LCD screen and print a welcome message for the user for one second,
OK, when we start the application.
So first, I will need to include the library, which is liquid crystal dot h.
Because I'm going to include libraries at the very top of the program, then I need to initialize some
things.
So let's do that here.
Define so exiting out this thing, which is for me a defined scd e pin, which is a form defined as
CD and then default pin.
And we need DeFore and we saw the five.
And we need the six and seven, which are things number six, seven.
Eight and nine, so that the six pins I need for initializing the LCG, let's initialize it here, so
let's create the density.
So I need to do liquid crystal, the same name as the library.
And then let's name this LCD and I need to give six.
Beans first the R.
S, then eat and then defore.
And then let's go back to a new line to make it nicer to read the five, the six.
Discipline, close, parentheses, semicolon.
All right, now we have LCD, we don't need to worry about that anymore.
Let's go to the.
Void setup function now in the void setup, I can do Cazale begin that's initialized here, LCD that
begin with 16 by two.
So then I initialize all the pins, OK, and attach, interrupt and everything, what are you going
to do at the end of the setup is do see that print?
So if I do, I print the cursor is right now at zero and zero, so I don't need to set it.
And let's take initializing.
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
is the easiest way to do that.
And then and that clear.
OK, so, again, as I told you before, using delay in the setup may be OK not too long.
OK, for example, once again, two seconds, three seconds.
If you need to wait for something, that's not a problem because any way to set up will be called only
once.
And here is the fate behavior.
OK, but let's say you need to initialize some communication with the sensor.
You need to wait, for example, for five hundred milliseconds.
Then you can print something initializing and then when the communication is ready, then you just,
for example, clear the screen and then you can go to the loop function.
So it's just to show you what you can do, for example, to give some clue to the user that the application
is starting and waiting for something to be said.
And also using that here will be quite nice.
OK, when we start the application, we have a welcome message or one signal and then the application
starts.
So now let's see, let's verify.
We find projects that.
No.
S..
OK, not any problem, let's check if it's working, let's upload the code.
And you can see initializing and then stop.
OK, so whenever there is a problem here, there is a button we have initializing for one second and
then you can see the application starting with the Yellowhead, which starts to blink.
All right.
So that is the end of this step, which was actually quite small.