USB Serial Communication Between Arduino and Raspberry Pi

Let's try to communicate between Arduino and Raspberry Pi through USB cable using Serial communication.

Introduction

Communication between 2 controllers is quite helpful. It can unlock more possibilities and also be able to do task simultaneously. Previously, I have shared how to do communication between Raspberry Pi and Arduino using I2C communication. Now, instead of using I2C, I will show you how to do it through USB cable and using serial communication. This setup also possible to program Arduino board using Raspberry Pi.


Video

This video will show you how to do serial communication between Arduino and Raspberry Pi through USB cable.


Hardware Preparation

This is the list of items used in the video.


Sample Program

This is the sample code used in the video for Arduino (top) and Raspberry Pi (bottom).


Thank You

References:

  1. Python Serial library – PySerial
  2. Library to control GPIO on Raspberry Pi – gpiozero

Thanks for reading this tutorial. If you have any technical inquiry, please post at Cytron Technical Forum.

Leave a Comment

Your email address will not be published.

Share this Tutorial

Share on facebook
Share on whatsapp
Share on email
Share on print
Share on twitter
Share on pinterest
Share on facebook
Share on whatsapp
Share on email
Share on print
Share on twitter
Share on pinterest

Latest Tutorial

Control Stepper Motor 28BYJ-48 Using TTGO T-Display ESP32
Smart Dustbin
Interface LSM9DS1 9DOF IMU With TTGO T-Display ESP32
Send and Receive SMS Using TTGO ESP32 SIM800L
Getting Started With ProjekIoT.com Using Raspberry Pi
Scroll to Top