And now that you have a better understanding of digital things as output begins, let's quickly make
a recap of how to work with editor.
So here in our secret, we already have the plugged on PIN number 12.
So the first thing I'm going to do is to do a defined.
Define we've already been 12.
I'm going to create a constant here, we've defined all uppercase with an underscore and then directly
the value.
So whenever we needed to use this number in our code for the NDP, we just need to write a dippin instead,
which will make it much easier later on if, for example, we want to change the being where the entity
is attached.
So first that you use a defined to easily get access to the PIN number in your code and then in the
set.
So I'm going to remove that command in the set that you will use the pin mode function here to set the
mood of the pin.
So by now we have seen only the outputs.
So the first parameter is the PIN number and then the mode.
So the mode will be out, put all the keys and it should be OK.
Once you have done that, the PIN twelve is defined as an output, not an input.
B So from now on, after you have used the pin mode function, you can change the state of the pin and
we can directly do that here if we want to geto.
Right.
Elegy in we've let's say hi, because it will be low by default, but we said the and once we have set
the mode we can directly set the stage, whether high or low, don't know.
Let's say in our program we want to make the energy drink.
But first, when we start the program, we want the energy to be boiled on for three segments.
So, for example, we can do Delate three thousand here.
So we pour on the LCD, we wait for three Siggins and then we we enter the loop function and in the
loop function will digital right in here.
Maybe we are going to start with low and then wait for let's say five hundred milliseconds and then
digital.
Right in high wait for another five hundred milliseconds.
All right, and we have our blink example right here, but nothing complicated, as you can see.
First, we said the mode and once the mode is set, we can just change the state as many times as we
want.
Let's upload this program here.
All right, and you should see Oladipo out on for three singles and now the lady is blinking.