Book Image

Learn Robotics Programming

By : Danny Staple
Book Image

Learn Robotics Programming

By: Danny Staple

Overview of this book

We live in an age where the most difficult human tasks are now automated. Smart and intelligent robots, which will perform different tasks precisely and efficiently, are the requirement of the hour. A combination of Raspberry Pi and Python works perfectly when making these kinds of robots. Learn Robotics Programming starts by introducing you to the basic structure of a robot, along with how to plan, build, and program it. As you make your way through the book, you will gradually progress to adding different outputs and sensors, learning new building skills, and writing code for interesting behaviors with sensors. You’ll also be able to update your robot, and set up web, phone, and Wi-Fi connectivity in order to control it. By the end of the book, you will have built a clever robot that can perform basic artificial intelligence (AI) operations.
Table of Contents (21 chapters)

Further reading

There are a number of other tutorials on these sensors on the internet worth reading for further knowledge and experimentation:

  • First, I recommend looking at the datasheet for the sensor. You can search for the HC-SR04 datasheet. The Mouser link for it can be found at https://www.mouser.com/ds/2/813/HCSR04-1022824.pdf, but be warned that this may change.
  • ModMyPi has a tutorial with an alternative way to wire these and level shift their IO: https://www.modmypi.com/blog/hc-sr04-ultrasonic-range-sensor-on-the-raspberry-pi.
  • Raspberry Pi Tutorials also has a breadboard layout and Python script, using RPi.GPIO instead of gpiozero, at https://tutorials-raspberrypi.com/raspberry-pi-ultrasonic-sensor-hc-sr04/.
  • GPIOZero has its own class for dealing with the distance sensor, but it is only suitable for longer distances: https://gpiozero.readthedocs.io/en/stable/api_input...