WEBVTT

00:00.250 --> 00:04.890
Great, you now have created and applauded your first aid program.

00:05.040 --> 00:10.270
And before we go further, there is one thing you need to learn is how to use the serial moniteau.

00:10.560 --> 00:17.100
So basically, the program we are trying to solve is how to get some information about what's happening

00:17.100 --> 00:20.460
in the program from the Adreno to our computer.

00:20.790 --> 00:26.910
Basically, if you are familiar with the term, we are wanting to get some reblogging functionality

00:27.240 --> 00:32.670
and because the code is running on the out in the world and not on your computer, well, we can't just

00:32.670 --> 00:36.590
log stuff on the Arduino because we won't be able to see it.

00:36.930 --> 00:43.990
We need to use a special form of communication between our and our computer to be able to get some information.

00:44.010 --> 00:47.670
And that is cellular communication and goodnews.

00:47.670 --> 00:51.300
The cellular communication is actually going through the USB cable.

00:51.650 --> 00:53.570
You don't need any other power setup.

00:54.030 --> 00:58.400
So let's see how cell works and we need to remove that commands.

00:58.860 --> 01:03.570
You can start by writing cell with the keys.

01:03.570 --> 01:03.820
Okay.

01:03.840 --> 01:07.760
You should see it then arrange that begin.

01:08.280 --> 01:14.680
OK, so you open parentheses and inside you are going to put nine thousand six hundred.

01:15.150 --> 01:16.680
And don't forget the cynical.

01:17.190 --> 01:19.920
OK, this will initialize.

01:21.550 --> 01:23.230
Cellular communication.

01:25.160 --> 01:30.320
And of course, we put it in the setup function because this is something that we are going to do only

01:30.320 --> 01:32.120
once at the beginning of the program.

01:32.360 --> 01:35.270
And this number here is called the board.

01:35.270 --> 01:35.720
Right.

01:35.740 --> 01:39.410
So basically how fast the data transfer will be.

01:39.590 --> 01:45.470
And we are going to use this value because this is a pretty common and classic value for Arduino.

01:45.890 --> 01:54.530
So after we have initialized sale communication, we can do sell young dot print or sell the print L.N..

01:54.950 --> 01:59.720
OK, we're going to use print Palin to simply print some text.

01:59.960 --> 02:00.500
Hello.

02:02.420 --> 02:08.480
So don't forget here, the codes to define this will be a train.

02:08.630 --> 02:12.710
OK, you close the parentheses and add this semicolon.

02:13.250 --> 02:20.510
OK, so now if I so I can verify your code and I can upload directly which will first verify and then

02:20.660 --> 02:21.200
upload.

02:21.950 --> 02:28.560
Let's name the project debug artist debug.

02:30.540 --> 02:38.010
OK, compiling, uploading and uploading, so now, well, these coyotes are running on the alino,

02:38.280 --> 02:42.030
but how can we actually get this data here?

02:42.390 --> 02:46.940
Well, you need to open the monitor and to open the ceremony to here.

02:47.220 --> 02:48.630
You can click on here.

02:48.630 --> 02:51.900
You can see say a little on this icon here.

02:53.450 --> 02:58.450
And here, well, you don't see anything is because the set up is not quite correct here.

02:58.760 --> 03:06.620
So let's look at the bottom of this window so you can leave Squirrelled checked and this and checked.

03:07.280 --> 03:11.330
And then it's important that you check no line ending.

03:11.660 --> 03:14.150
And then here you have to choose a bod.

03:14.150 --> 03:14.710
Right.

03:15.140 --> 03:18.910
OK, so you have different numbers which are pretty common for all you know.

03:19.220 --> 03:24.140
And as you can see here, we have a board rate of one hundred, fifteen thousand and two hundred.

03:24.530 --> 03:28.770
But in our program we have a rate of nine thousand six hundred.

03:29.090 --> 03:35.060
So this is not the same board rate, which means this is not the same speed of transfer and which means

03:35.060 --> 03:41.710
that we simply can't communicate between the two, between the original and between the same window

03:41.720 --> 03:43.070
here on the computer.

03:43.430 --> 03:45.200
So you need to provide the same both.

03:45.200 --> 03:45.540
Right.

03:45.680 --> 03:54.140
OK, I'm going to use nine thousand six hundred and now so this will actually make the other restart.

03:54.620 --> 03:55.650
And no, you can see.

03:55.670 --> 03:56.990
Hello, Adrian.

03:57.590 --> 03:57.900
Great.

03:57.920 --> 04:02.660
So make sure you have the same board right between your program and the same monitor.

04:02.690 --> 04:06.620
This is one of the most common mistakes when you begin and no one does.

04:06.620 --> 04:11.240
Great, because whatever we want to print on the I don't know what will be able to see it on the same

04:11.240 --> 04:11.620
monitor.

04:11.630 --> 04:15.470
So we have the functionality with logging.

04:16.280 --> 04:22.430
And now just I'm going to make a few additions to this program just so you can see another time how

04:22.430 --> 04:24.710
to set up and loop functions are working.

04:25.220 --> 04:26.500
So keep in the loop.

04:26.510 --> 04:29.600
What I'm going to do is to sell that print, Ellen.

04:30.710 --> 04:32.210
Let's sit in the loop.

04:34.300 --> 04:44.590
OK, and then delay five hundred milliseconds, so in the loop, I'm going to print so in the loop the

04:44.590 --> 04:51.910
text and wait for zero point five Segan and also so we print and it will print.

04:51.910 --> 04:53.440
Plus add a new line.

04:53.590 --> 04:56.040
OK, if you just use print, it will print.

04:56.050 --> 05:02.900
But whatever text you print will be added to the directly to the last piece of string you have printed.

05:03.160 --> 05:11.650
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

05:11.730 --> 05:12.910
block this code.

05:14.980 --> 05:22.080
I can open the cell monitor and you will see hello and then look in, etc..

05:22.650 --> 05:30.030
OK, so I'm going to remove photos from here so you can clearly see that the code inside of the setup

05:30.030 --> 05:35.120
function is executed once and the code inside the loop function is executed.

05:35.400 --> 05:37.770
Well, an infinite number of time.

05:40.850 --> 05:46.010
All right, now you know how to use the same money to develop your program, and we are going to come

05:46.010 --> 05:47.100
back to this CNN Money.

05:47.120 --> 05:50.600
So we've much more details later in the schools.
