WEBVTT

00:00.180 --> 00:04.170
And a new entity to practice with the communication.

00:04.500 --> 00:11.580
So we decided we are going to use one entity from the secret we have and decided communication to send

00:11.580 --> 00:14.890
a number from the computer to the original.

00:15.150 --> 00:18.590
And so what you are going to do first is very simple.

00:18.750 --> 00:26.820
The first step is to make the blink ring the ability so you can choose any entity you want to be in

00:26.820 --> 00:27.660
2011.

00:28.210 --> 00:29.250
It doesn't really matter.

00:29.250 --> 00:30.630
Just make an entity blink.

00:30.780 --> 00:36.420
And then, of course, you need to choose a delay to set a frequency for the week.

00:36.960 --> 00:39.520
And here is where you will you say communication.

00:40.140 --> 00:46.980
So the value you have in the delay in Michigan will be the value that you send of the cell communication

00:48.060 --> 00:48.410
here.

00:48.930 --> 00:55.580
When we send a number, let's say send 300 or we press enter and this will become the new delay.

00:55.770 --> 01:00.570
And during the execution of the program, every time we send a new number, this will become the new

01:00.570 --> 01:00.990
delay.

01:01.970 --> 01:03.610
We can do is in the loop.

01:03.720 --> 01:11.360
We will use what we've seen before to read data from the cell communication and then use the bus information

01:11.360 --> 01:12.200
to get a number.

01:12.200 --> 01:18.020
And this number we're going to delete also because there will be no value set at the beginning when

01:18.020 --> 01:23.300
you run the program where you just start the program so you can use a default value, OK, for the first

01:23.300 --> 01:27.650
time until you send a value through the sale communication.

01:27.890 --> 01:32.540
Also, to make things a little bit more interesting, you will need to validate.

01:33.830 --> 01:36.620
Validate the user input.

01:36.770 --> 01:44.270
OK, because the delay, we're going to say that the delay can only be between one hundred milliseconds

01:44.660 --> 01:51.860
and one thousand milliseconds so that the only values that we are going to accept.

01:52.610 --> 01:57.740
So if you send here a delay of 10 milliseconds, that will not work.

01:58.290 --> 02:00.780
Send one thousand three hundred.

02:00.920 --> 02:02.480
That will not work either.

02:02.870 --> 02:08.160
OK, so you need to validate the user input to make sure it's between one hundred and one thousand.

02:08.510 --> 02:08.860
All right.

02:08.870 --> 02:11.750
And I will see you in the next lesson for the solution.
