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

Program PikaBot Using mBlock
Monitor Temperature Humidity Using IoT Telegram Bot on ESP32
Control PikaBot Using a Phone Through Bluetooth
Display Heart Rate Data on IoT Blynk Using Arduino
DS18B20 Waterproof Temperature Sensor with Maker UNO
Scroll to Top