Book Image

Learn Robotics Programming - Second Edition

By : Danny Staple
Book Image

Learn Robotics Programming - Second Edition

By: Danny Staple

Overview of this book

We live in an age where the most complex or repetitive tasks are automated. Smart robots have the potential to revolutionize how we perform all kinds of tasks with high accuracy and efficiency. With this second edition of Learn Robotics Programming, you'll see how a combination of the Raspberry Pi and Python can be a great starting point for robot programming. The book starts by introducing you to the basic structure of a robot and shows you how to design, build, and program it. As you make your way through the book, you'll add different outputs and sensors, learn robot building skills, and write code to add autonomous behavior using sensors and a camera. You'll also be able to upgrade your robot with Wi-Fi connectivity to control it using a smartphone. Finally, you'll understand how you can apply the skills that you've learned to visualize, lay out, build, and code your future robot building projects. By the end of this book, you'll have built an interesting robot that can perform basic artificial intelligence operations and be well versed in programming robots and creating complex robotics projects using what you've learned.
Table of Contents (25 chapters)
1
Section 1: The Basics – Preparing for Robotics
7
Section 2: Building an Autonomous Robot – Connecting Sensors and Motors to a Raspberry Pi
15
Section 3: Hearing and Seeing – Giving a Robot Intelligent Sensors
21
Section 4: Taking Robotics Further

Strategy 3 – Making SD card backups

Git and SFTP are great for keeping code safe, but they don't help you reinstall and reconfigure Raspberry Pi OS on a card. The procedures for Windows, Linux, and macOS are quite different for this. The basic idea is to insert the SD card and use a tool to clone the whole card to a file known as an image, which you can restore with balenaEtcher when you need recovery.

Important note

You should only restore images to cards of the same size or larger. Putting an image on a smaller device is likely to fail to write, creating a corrupt SD card.

Before we begin, properly shut down your Raspberry Pi, take out its SD card, and put that into your computer. These clean images are large, so do not put them in your Git repository. It's beyond the scope of this chapter, but I recommend finding a way to compress these files as they are mostly empty right now. In all cases, expect this operation to take 20-30 minutes due to the image...