Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Learn Robotics Programming
  • Table Of Contents Toc
Learn Robotics Programming

Learn Robotics Programming - Third Edition

By : Danny Staple
close
close
Learn Robotics Programming

Learn Robotics Programming

By: Danny Staple

Overview of this book

Learn Robotics Programming, Third Edition, addresses a common challenge for developers, hobbyists, and newcomers: turning robotics ideas into building and programming real, functional robots. While many resources focus either on theory or isolated components, it can be difficult to bring together hardware, software, and intelligent behavior into a working robotic system. This book provides a structured, hands-on path to designing and building robots using Raspberry Pi and Python. You’ll start by assembling a mobile robot and setting up its core systems, then progressively add capabilities such as motor control, sensor integration, and remote operation through web interfaces. As you advance, you’ll implement vision and voice features using OpenCV and ML voice models and explore intelligent behaviors, including localisation and sensor fusion, to help your robot navigate and respond to its environment. By the end of the book, you’ll have built a fully functional robot and developed the skills to design, program, and extend your own robotic systems. Whether you are getting started or already have programming experience, you’ll learn how to combine hardware and software into cohesive solutions and apply practical techniques for creating responsive, intelligent robots. *Email sign-up and proof of purchase required
Table of Contents (28 chapters)
close
close
1
Part 1: The Basics – Preparing for Robotics
6
Part 2: Building an Autonomous Robot – Connecting Sensors and Motors to a Raspberry Pi
16
Part 3: Hearing and Seeing – Giving a Robot Intelligent Sensors
21
Part 4: Taking Robotics Further
24
Other Books You May Enjoy
25
Index

6

Drive and Turn – Moving Motors with MQTT and Python

In the previous chapter, we learned how to build the robot chassis, wire in motors, and power it.

In this chapter, we will take the robot we built in the last chapter and build the Python code to make the motors move. We'll see how to use motors to steer our robot, and how our code will get the robot moving! We will learn about MQTT, and how to use it to bridge between the physical robot and its behavior code, reducing the impact of hardware changes. The MQTT layer serves as a foundation for all our robot behaviors, and we will finish by programming a small set path following behavior to demonstrate using MQTT.

We will cover the following topics in this chapter:

  • Using Python to test robot motors
  • Steering a robot
  • Making an MQTT service for the main breakout
  • Troubleshooting
  • Following a path with MQTT
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
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon