Great, you now have created and applauded your first aid program.
And before we go further, there is one thing you need to learn is how to use the serial moniteau.
So basically, the program we are trying to solve is how to get some information about what's happening
in the program from the Adreno to our computer.
Basically, if you are familiar with the term, we are wanting to get some reblogging functionality
and because the code is running on the out in the world and not on your computer, well, we can't just
log stuff on the Arduino because we won't be able to see it.
We need to use a special form of communication between our and our computer to be able to get some information.
And that is cellular communication and goodnews.
The cellular communication is actually going through the USB cable.
You don't need any other power setup.
So let's see how cell works and we need to remove that commands.
You can start by writing cell with the keys.
Okay.
You should see it then arrange that begin.
OK, so you open parentheses and inside you are going to put nine thousand six hundred.
And don't forget the cynical.
OK, this will initialize.
Cellular communication.
And of course, we put it in the setup function because this is something that we are going to do only
once at the beginning of the program.
And this number here is called the board.
Right.
So basically how fast the data transfer will be.
And we are going to use this value because this is a pretty common and classic value for Arduino.
So after we have initialized sale communication, we can do sell young dot print or sell the print L.N..
OK, we're going to use print Palin to simply print some text.
Hello.
So don't forget here, the codes to define this will be a train.
OK, you close the parentheses and add this semicolon.
OK, so now if I so I can verify your code and I can upload directly which will first verify and then
upload.
Let's name the project debug artist debug.
OK, compiling, uploading and uploading, so now, well, these coyotes are running on the alino,
but how can we actually get this data here?
Well, you need to open the monitor and to open the ceremony to here.
You can click on here.
You can see say a little on this icon here.
And here, well, you don't see anything is because the set up is not quite correct here.
So let's look at the bottom of this window so you can leave Squirrelled checked and this and checked.
And then it's important that you check no line ending.
And then here you have to choose a bod.
Right.
OK, so you have different numbers which are pretty common for all you know.
And as you can see here, we have a board rate of one hundred, fifteen thousand and two hundred.
But in our program we have a rate of nine thousand six hundred.
So this is not the same board rate, which means this is not the same speed of transfer and which means
that we simply can't communicate between the two, between the original and between the same window
here on the computer.
So you need to provide the same both.
Right.
OK, I'm going to use nine thousand six hundred and now so this will actually make the other restart.
And no, you can see.
Hello, Adrian.
Great.
So make sure you have the same board right between your program and the same monitor.
This is one of the most common mistakes when you begin and no one does.
Great, because whatever we want to print on the I don't know what will be able to see it on the same
monitor.
So we have the functionality with logging.
And now just I'm going to make a few additions to this program just so you can see another time how
to set up and loop functions are working.
So keep in the loop.
What I'm going to do is to sell that print, Ellen.
Let's sit in the loop.
OK, and then delay five hundred milliseconds, so in the loop, I'm going to print so in the loop the
text and wait for zero point five Segan and also so we print and it will print.
Plus add a new line.
OK, if you just use print, it will print.
But whatever text you print will be added to the directly to the last piece of string you have printed.
So what you want to do usually is to use print and if you want to print one text per line and now let's
block this code.
I can open the cell monitor and you will see hello and then look in, etc..
OK, so I'm going to remove photos from here so you can clearly see that the code inside of the setup
function is executed once and the code inside the loop function is executed.
Well, an infinite number of time.
All right, now you know how to use the same money to develop your program, and we are going to come
back to this CNN Money.
So we've much more details later in the schools.