WEBVTT

00:00.150 --> 00:06.000
In this new activity, you are going to practice with the infrared remote controller and actually you

00:06.000 --> 00:12.810
are going to mix that functionality with the LCD display screen and with the different LCD that you

00:12.810 --> 00:13.740
have on your circuit.

00:14.040 --> 00:17.860
So once again, we are going to create a multi functionality application.

00:18.120 --> 00:20.620
So what will you need to do here?

00:21.210 --> 00:27.330
So you will need to map some buttons of your infrared remote controller.

00:27.720 --> 00:35.080
We need to map the button zero, one, two, three, and then the button func stop.

00:35.100 --> 00:36.490
Or does the button stop?

00:36.520 --> 00:39.690
OK, that's the buttons we are going to use.

00:39.720 --> 00:42.420
So one, two, three, four, five buttons.

00:42.600 --> 00:45.420
And no one's to get the mapping from those numbers.

00:45.540 --> 00:49.150
You are going to associate a different action for each number.

00:49.170 --> 00:55.060
So if you press on zero, what you're going to do is clear all editors.

00:56.110 --> 01:00.880
Or just power of all entities.

01:00.940 --> 01:09.540
OK, so you're going to use the three entities if you press one, you are going to toggle energy on

01:09.820 --> 01:12.730
12 that to having to call any one.

01:14.140 --> 01:19.390
So a little girl, I mean that if you press the button, then you are going to put her on the egg and

01:19.390 --> 01:22.890
if you press the button again, you are going to pour out of the edit.

01:22.990 --> 01:26.440
So you are going to need to keep the status for the eight as.

01:26.560 --> 01:33.910
OK, then to you are going to toggle 82 until 11.

01:34.240 --> 01:40.600
And when you press the three, you are going to get any three on been there.

01:41.290 --> 01:47.830
So one, two or three to toggle the LG one, two or three and then zero to pull off all the entities.

01:47.950 --> 01:53.710
Then once you are going to do also is to set up the LCD display screen.

01:53.920 --> 01:59.130
And whenever you do an action, you are going also to print something on the screen.

01:59.230 --> 02:08.170
So whenever you do something on the first line and see the first line, you are going to print just

02:08.170 --> 02:09.450
the number you receive.

02:09.520 --> 02:13.570
So print the the value add to the data, the command.

02:15.310 --> 02:16.070
That's your receipt.

02:16.480 --> 02:18.670
And on the second line.

02:20.400 --> 02:21.420
You are going to print.

02:22.450 --> 02:32.590
The text for the action used to, for example, forgive eligible, OK, just as an example to and two

02:32.590 --> 02:41.670
to three poll of all trades and one additional nothing that you going to do is if you press on the button,

02:41.680 --> 02:46.480
think or stop, you are going to clear, Nancy.

02:46.990 --> 02:52.840
So if you press that button you don't interact with the edit is you just clear whatever is on the LCD

02:52.840 --> 02:53.210
screen.

02:53.530 --> 02:53.890
All right.

02:53.900 --> 02:55.450
So make sure you go step by step.

02:55.600 --> 03:01.840
For example, first, you can set up the infrared remote control to map the numbers.

03:01.840 --> 03:09.580
Do the switch case are effective structure to go through all of the commands and then toggle the entities

03:09.580 --> 03:15.130
accordingly and after that, to use the entity to inform the user of what you have done?

03:15.130 --> 03:22.810
So step by step and also what I'm going to do is for the elves that is on the code, I'm going to use

03:23.020 --> 03:25.540
arrays and functions.

03:26.110 --> 03:33.370
So I'm going to put the three entities inside the ring so then I can set all the modes for just one

03:33.370 --> 03:33.850
function.

03:34.060 --> 03:39.790
I can pull off all it is and I can use the index also one, two or three.

03:39.790 --> 03:43.410
I can use the index on the array to toggle the editing.

03:43.780 --> 03:44.190
All right.

03:44.200 --> 03:47.290
And I will see you in the next lesson from the solution.
