WEBVTT

00:00.170 --> 00:05.330
Let's directly dive in and make the Raspberry Pi communicate with the Arduino.

00:05.420 --> 00:12.500
This first part of the course will lay the foundations you need in order to build any project using

00:12.500 --> 00:14.870
both Arduino and Raspberry Pi.

00:14.900 --> 00:19.670
Now, how are we going to make those two boats communicate between each other?

00:19.700 --> 00:23.630
Well, we are going to use serial communication.

00:23.630 --> 00:25.830
And what is serial communication?

00:25.850 --> 00:32.730
Basically, serial communication is simply a way to transfer data between two devices.

00:32.750 --> 00:40.850
More specifically, serial is based on the Uart protocol, which means universal asynchronous reception

00:40.850 --> 00:42.530
and transmission.

00:42.740 --> 00:49.820
If this sounds complicated, well, this is not asynchronous reception, and transmission simply means

00:49.820 --> 00:56.090
that you can talk from the Raspberry Pi to the Arduino and from the Arduino to the Raspberry Pi at the

00:56.090 --> 01:02.220
same time, just like when you are chatting with someone on your phone, you can send messages and the

01:02.220 --> 01:05.620
other person can send messages at the same time.

01:05.640 --> 01:07.430
Now, don't worry too much.

01:07.440 --> 01:13.980
We won't need to dive into the low level details because there are some high level libraries that we

01:13.980 --> 01:18.820
can directly use in our code and which will make things easier.

01:18.840 --> 01:22.590
In fact, you probably already know serial communication.

01:22.590 --> 01:27.960
If you were using the serial monitor on the Arduino IDE to debug your Arduino.

01:27.990 --> 01:36.440
Well, this is serial communication between your Arduino board and your Arduino IDE on your computer.

01:36.450 --> 01:42.960
What we will do now is that instead of communicating between Arduino and the serial monitor, we will

01:42.960 --> 01:49.560
create a communication between Alverno and a Python program on the Raspberry Pi.

01:49.770 --> 01:55.620
So in this section, I will first show you how to do the required setup for serial communication to

01:55.620 --> 01:56.220
work.

01:56.250 --> 02:03.540
We will then initiate a communication between the Raspberry Pi and Arduino board and step by step through

02:03.540 --> 02:09.510
several code iterations, you will discover the different ways to communicate with Serial.

02:09.990 --> 02:15.750
After this, I will give you some activities so you can practice on everything you will see now.

02:15.930 --> 02:16.350
All right.

02:16.350 --> 02:18.150
And let's get started.
