Now that you have correctly plugged your LCD display screen with your OTTERNESS secret, let's actually
see how to print some text on the LCD screen and you will see that's actually really simple to do.
So we just need to set up the pins and the LCD screen correctly and then that would be super easy.
So the first thing we need to do is to include a new library, include liquid crystal dot h.
OK, so just like we have done with the iPad from memory, if you remember, we use the same format,
OK, for include.
But this time we use, of course, liquid crystal.
This is the library to print text on the LTTE display screen and this library is already installed with
your Arduino.
So now what we need to do, we are going to do define for all the things that we need, OK, for that
library.
So once we have done that, we don't need to worry anymore about the numbers of the pin.
So I'm going to start with LCD and then the name of the PIN.
So Elsley are as being we are going to need that beam and that pin is actually plugged to unlock a five.
So that's an analog we are going to use as a normal digital feed.
Then we have LCD screen, which is on a four, also an analog, and we are going to use as a digital
pin and then define density.
We we're going to need default pin, which is lowered to digital PIN number six and the five, which
is on page seven.
Then we have.
That's six and eight and the last one as the seven pin on PIN number nine.
So we are going to need to use those six pins.
So make sure have correctly plugged the component and also make sure that let's say you have used a
different pin than for my secret, which is totally fine.
But make sure you correctly use the right name for the right pin, OK?
And now to initialize the liquid crystal, first we need to create a liquid crystal object or key from
that library.
So to do that, we are going to do that in the global scope liquid crystal.
So you put liquid crystal the name of the library, and then you put LCD open, close parentheses and
don't forget the semicolon.
And here we are going to need to give the different pins, OK, so that the LCD can initialize the pins
with the correct number.
And the first one is the R.
S.
So you need to provide the arguments in the order.
That's very important.
Then you have to eat.
OK, and then default.
What I'm going to do is go back to a new line, so it's.
Easier to read than we have defined the six.
And so just in the other, I have written the pin here, that's very important, you keep the same order
here.
All right.
And once you have done that, well, you don't need to worry anymore about the pins and the hardware.
You just need to use the functionality to bring some text.
So in the setup, we're going to need to initialize the screen.
So that's the same name here.
Don't begin.
And then you need to provide two arguments.
I'm going to be 16 and two.
So basically how many Kolon you are going to use and how many rows of lines you are going to use, because
this is a 16 by two characters screen.
Well, we just put 16 and two because the LCD library will also look for screens that have a different
size.
So with this special hardware, you are going to use LCD beginning with 16 and two.
And once you have done that, you can simply print some text with density that print say hello world.
OK, that's very similar as what you did with the cell communication.
Actually, you just have a print function and then you put some text and let's run this.
So I have connected my board and it's uploading.
It's the same as LCD.
OK, and that is what you may see.
OK, so you will have the energy, so basically the energy of the LCD spoiled answer, the LCD powelltown,
that you don't see any text.
And this is because you actually need to tune the LCD with the potential monitor here.
So the potential matter has the data goes through a pin of the LCD, OK, to tune the contrast of the
LCD screen.
So here, I'm going to turn it and see what I can do and turn it on one side and the other side and
oh, you can see here I get the other one.
So you need the potential to be able to tune the LCD contrast so you can see what's written.
OK, so here it looks good.
And we have the HelloWallet printed on our display screen.
And back to Tinker Cat to show you how it works, so we have our secret with the LCD display screen
actually here, I didn't really mean.
So I'm going to rename it LCD if I see 16 by two.
And so I have the same exact thing, code trying to bring to the world.
Let's run the simulation and let's see what we get on the inside.
So you see, we have to help the world.
And I'm going to this is the position without having to turn it, OK?
And we have the exact same behavior as we had for the real acidy.
So they look here, we were already having HelloWallet.
These OK, this seems the correct said OK, you can see is the same thing for tuning the potential matter
in the real housesitter up in the simulation.