Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Learn Robotics Programming

You're reading from   Learn Robotics Programming Build and control cutting-edge AI robots with Raspberry Pi and Python

Arrow left icon
Product type Paperback
Published in Dec 2025
Last Updated in Sep 2025
Publisher Packt
ISBN-13 9781803246987
Length 566 pages
Edition 3rd Edition
Languages
Concepts
Arrow right icon
Author (1):
Arrow left icon
Danny Staple Danny Staple
Author Profile Icon Danny Staple
Danny Staple
Arrow right icon
View More author details
Toc

Table of Contents (9) Chapters Close

Learn Robotics Programming, Third Edition: Build and control cutting-edge AI robots with Raspberry Pi and Python
1 Introduction to Robotics FREE CHAPTER 2 Exploring Robot Building Blocks – Code and Electronics 3 Preparing a Headless Raspberry Pi for a Robot 4 Protecting Robot Code with Git 5 Building Robot Basics – Wheels, Power, and Wiring 6 Drive and Turn – Moving Motors with MQTT and Python 7 Driving the Robot with a Phone and Python 8 Programming Distance Sensors with Python

Making sensor data available in MQTT

Like our other robot functions, we will make this available via MQTT. MQTT will be used to control this sensor and to start broadcasting it’s data.

System design

Before we build more, let’s check on the system design. Look at the following figure:

Figure 8.14 – Distance sensor system

The preceding figure shows our system design. It has elements from our driving system; however, some items are left out as we aren’t changing them or directly making use of them here. The Distance sensor service is designed to send it’s sensor data over MQTT while receiving sensor control instructions over MQTT. The Web server serves web pages. In the browser, the Distance plotting library uses JS components (such as Chart JS) to display our distance sensor data, received via MQTT, and it’s made use of in a Distance plotter page, and a Manual drive with distance page too.The code running in the browser may still send Motor topic...

lock icon The rest of the chapter is locked
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Learn Robotics Programming
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime
Modal Close icon
Modal Close icon