WEBVTT

00:00.170 --> 00:01.340
In this activity.

00:01.370 --> 00:06.920
Number four, we are going to start from the code actually of the activity number three.

00:06.920 --> 00:11.540
So we have the Python code on the Raspberry Pi here and the Cplusplus code on the Arduino.

00:11.540 --> 00:19.310
So first thing I'm going to just copy this inside a new project okay I'm going to close that okay.

00:19.340 --> 00:21.320
So I have this new project.

00:21.890 --> 00:23.840
And let's remove the logs here.

00:24.920 --> 00:30.110
And let's copy this inside this new file also.

00:30.110 --> 00:36.290
And well I'm just gonna add here Time.sleep 0.0.

00:36.320 --> 00:40.310
And that was missing and that I previously forgot okay.

00:40.340 --> 00:42.410
So now well basically that's going to be the same.

00:42.410 --> 00:47.360
But this program is going to consume less resources okay.

00:47.390 --> 00:48.980
And much less CPU.

00:48.980 --> 00:51.110
So what is your challenge here.

00:51.110 --> 00:54.860
Your challenge is simply to debug what you receive okay.

00:54.890 --> 01:00.380
And what you do on the Arduino with the LCD screen that we have added.

01:00.410 --> 01:00.710
Okay.

01:00.740 --> 01:06.490
If you remember before I told you that it was kind of difficult to debug what's going on in the Arduino,

01:06.490 --> 01:08.560
so what you receive, etc..

01:08.560 --> 01:15.190
Well, what we can do now is when we receive something, we can print that on the LCD.

01:15.220 --> 01:21.490
When we send something, we can also print that on the LCD, for example with a log message send counter

01:21.490 --> 01:22.990
and the counter.

01:23.380 --> 01:29.650
So what you can do here in this activity is first initialize the LCD here.

01:29.650 --> 01:35.350
And then well whenever you receive something or you send something you print that on the LCD.

01:35.350 --> 01:38.740
So you print a nice message and you can play with the cursor okay.

01:38.770 --> 01:42.250
So you can make sure that all the text is on the screen.

01:42.280 --> 01:47.170
And so of course here you are more limited because you only have a screen that is 16 by two.

01:47.200 --> 01:50.800
So you can only put 32 characters max at a time.

01:50.830 --> 01:56.950
Okay, so that's a bit limited, but still you can get good information from what is going on in your

01:56.950 --> 01:57.790
program.

01:57.790 --> 02:02.140
And well, on the Raspberry Pi side, there is nothing to change.

02:02.140 --> 02:05.530
We are just going to use the exact same program.

02:05.560 --> 02:08.680
All right, I will see you in the next video for the solution.
