Let's directly dive in and make the Raspberry Pi communicate with the Arduino.
This first part of the course will lay the foundations you need in order to build any project using
both Arduino and Raspberry Pi.
Now, how are we going to make those two boats communicate between each other?
Well, we are going to use serial communication.
And what is serial communication?
Basically, serial communication is simply a way to transfer data between two devices.
More specifically, serial is based on the Uart protocol, which means universal asynchronous reception
and transmission.
If this sounds complicated, well, this is not asynchronous reception, and transmission simply means
that you can talk from the Raspberry Pi to the Arduino and from the Arduino to the Raspberry Pi at the
same time, just like when you are chatting with someone on your phone, you can send messages and the
other person can send messages at the same time.
Now, don't worry too much.
We won't need to dive into the low level details because there are some high level libraries that we
can directly use in our code and which will make things easier.
In fact, you probably already know serial communication.
If you were using the serial monitor on the Arduino IDE to debug your Arduino.
Well, this is serial communication between your Arduino board and your Arduino IDE on your computer.
What we will do now is that instead of communicating between Arduino and the serial monitor, we will
create a communication between Alverno and a Python program on the Raspberry Pi.
So in this section, I will first show you how to do the required setup for serial communication to
work.
We will then initiate a communication between the Raspberry Pi and Arduino board and step by step through
several code iterations, you will discover the different ways to communicate with Serial.
After this, I will give you some activities so you can practice on everything you will see now.
All right.
And let's get started.