Uploaded December 2025 | Updated September 2026, 2 weeks ago
In this final episode of the ROS 2 tutorial series, we bridge the gap between simulation and the real world by integrating ROS 2 with actual robot hardware. A common point of confusion for newcomers is why ROS does not include many seemingly obvious hardware libraries for controlling robots (e.g. motors and sensors). The reason is that ROS is designed as a middleware: it works best as a modular, scalable multiprocessing communication platform. It’s not meant for hard, real-time control.
In this video, we’ll look at why time-critical tasks (like PWM motor control) and interrupt handing are better handled by a microcontroller and how ROS 2 nodes can communicate with that microcontroller to control a physical robot.
The written guide for this episode can be found here: digikey.com/en/maker/tutorials/2025/intro-to-ros-part-12-talking-to-microcontrollers
The GitHub repository containing the Docker image and example code for this series can be found here: github.com/ShawnHymel/introduction-to-ros
The demo uses a Raspberry Pi 4B running Ubuntu 24.04 and ROS 2 Jazzy as the high-level computer, paired with a Raspberry Pi RP2350-based controller on the XRP educational robotics platform for low-level motor control.
We walk through setting up serial communication over USB, writing simple Arduino firmware to parse motor commands, and building a Python ROS 2 node that sends those commands in real time. Along the way, you’ll see practical considerations like Linux’s non-deterministic scheduling, why microcontrollers are essential for real-time robotics, and how this SBC + MCU architecture scales to more complex systems.
We’ll briefly cover installing ROS 2 on a Raspberry Pi, configuring SSH and VS Code for remote development, setting up a Python virtual environment, and creating a custom ROS 2 package with colcon. The example driver node implements a small state machine that drives, turns, and stops the robot by sending serial commands, which demonstrates a clean separation between high-level robot logic in ROS 2 and low-level hardware control on the microcontroller.
To close out the series, the video shows how this architecture enables more advanced robotics features like computer vision and autonomy. Using OpenCV, a ROS 2 vision node tracks a colored object and publishes bounding box data, while a driver node subscribes to that data and steers the robot toward the target in real time. This final project highlights the real power of ROS 2: combining perception, decision-making, and hardware control into a scalable system.
eXperiential Robotics Platform (XRP): digikey.com/en/products/detail/sparkfun-electronics/28009/26266382
0:00 Intro
1:06 Overview of the hardware
4:32 Writing the Arduino motor controller
14:47 Setting up ROS on the Raspberry Pi
20:56 Writing the ROS node
27:13 Running the simple ROS demo on real hardware
28:28 Ball tracking vision demo
29:15 Conclusion
Maker.io - digikey.com/en/maker
DigiKey’s Blog – TheCircuit digikey.com/en/blog
Connect with DigiKey on Facebook facebook.com/digikey.electronics
And follow us on X: https://x.com/digikey
In this final episode of the ROS 2 tutorial series, we bridge the gap between simulation and the real world by integrating ROS 2 with actual robot hardware. A common point of confusion for newcomers is why ROS does not include many seemingly obvious hardware libraries for controlling robots (e.g. motors and sensors). The reason is that ROS is designed as a middleware: it works best as a modular, scalable multiprocessing communication platform. It’s not meant for hard, real-time control.
In this video, we’ll look at why time-critical tasks (like PWM motor control) and interrupt handing are better handled by a microcontroller and how ROS 2 nodes can communicate with that microcontroller to control a physical robot.
The written guide for this episode can be found here: digikey.com/en/maker/tutorials/2025/intro-to-ros-part-12-talking-to-microcontrollers
The GitHub repository containing the Docker image and example code for this series can be found here: github.com/ShawnHymel/introduction-to-ros
The demo uses a Raspberry Pi 4B running Ubuntu 24.04 and ROS 2 Jazzy as the high-level computer, paired with a Raspberry Pi RP2350-based controller on the XRP educational robotics platform for low-level motor control.
We walk through setting up serial communication over USB, writing simple Arduino firmware to parse motor commands, and building a Python ROS 2 node that sends those commands in real time. Along the way, you’ll see practical considerations like Linux’s non-deterministic scheduling, why microcontrollers are essential for real-time robotics, and how this SBC + MCU architecture scales to more complex systems.
We’ll briefly cover installing ROS 2 on a Raspberry Pi, configuring SSH and VS Code for remote development, setting up a Python virtual environment, and creating a custom ROS 2 package with colcon. The example driver node implements a small state machine that drives, turns, and stops the robot by sending serial commands, which demonstrates a clean separation between high-level robot logic in ROS 2 and low-level hardware control on the microcontroller.
To close out the series, the video shows how this architecture enables more advanced robotics features like computer vision and autonomy. Using OpenCV, a ROS 2 vision node tracks a colored object and publishes bounding box data, while a driver node subscribes to that data and steers the robot toward the target in real time. This final project highlights the real power of ROS 2: combining perception, decision-making, and hardware control into a scalable system.
eXperiential Robotics Platform (XRP): digikey.com/en/products/detail/sparkfun-electronics/28009/26266382
0:00 Intro
1:06 Overview of the hardware
4:32 Writing the Arduino motor controller
14:47 Setting up ROS on the Raspberry Pi
20:56 Writing the ROS node
27:13 Running the simple ROS demo on real hardware
28:28 Ball tracking vision demo
29:15 Conclusion
Maker.io - digikey.com/en/maker
DigiKey’s Blog – TheCircuit digikey.com/en/blog
Connect with DigiKey on Facebook facebook.com/digikey.electronics
And follow us on X: https://x.com/digikey


![Autopilot Engage [Maker Update] | Maker.io
Autopilot Engage [Maker Update] | Maker.io Autopilot Engage [Maker Update] | Maker.io](https://i.ytimg.com/vi/G_LZY32h-h8/mqdefault.jpg)




![Pick-Me-Up [Maker Update] | Maker.io
This week on Maker Update: getting a grip on your laundry, an all-natural disco lamp, an all-seeing Coglet, and tiny servos for a tiny crawler.
+Show Notes [Maker Update Ep.476]+
=Project of the Week=
Stringman by Nathaniel Nifong 0:28
https://neufangled.com/
Shop Raspberry Pi Zero 2W on DigiKey:
https://www.digikey.com/en/product-highlight/r/raspberry-pi/raspberry-pi-zero-2-w
=More Projects=
Tree Branch Wall Lamp with Sound Reactive Lights by Erin St Blaine 2:15
https://learn.adafruit.com/tree-branch-wall-lamp-with-sound-reactive-lights
Introducing Coglet by Will Cogley 2:59
https://www.youtube.com/watch?v=k_1Paexlc_A
I Built The Worlds Smallest Robot Dog! by Dorian Todd 3:46
https://www.youtube.com/watch?v=nmmopQ1EEs0
=Tips & Tools=
Pens & Paper | Drawing Machines 101 by Dan Catt 4:40
https://www.youtube.com/watch?v=8bsWp6pKeYk
Olaf: Bringing an Animated Character to Life in the Physical World | Disney Research 5:06
https://www.youtube.com/watch?v=d-WdUYdOdHY
Using Ironing to Add Graphics to 3D Prints Julius Makes 5:20
https://www.youtube.com/watch?v=DYhGsloosWY
=DigiKey Spotlight=
Shawn Hymel Presents 3D printing and FreeCAD 5:58
https://www.youtube.com/playlist?list=PLEBQazB0HUyTQkRkbD02DZqnlV6oBMhHB
#makerupdate
Maker Update is a weekly video series covering news, projects, tips, and events that interest the maker and DIY community.
Find more online:
Blog: http://makerprojectlab.com
Instagram: https://www.instagram.com/makerprojectlab/ Pick-Me-Up [Maker Update] | Maker.io](https://i.ytimg.com/vi/HZ6xq52eUAI/mqdefault.jpg)


