Book Image

Practical Arduino Robotics

By : Lukas Kaul
Book Image

Practical Arduino Robotics

By: Lukas Kaul

Overview of this book

Every robot needs a “brain,” and the Arduino platform provides an incredibly accessible way to bring your Arduino robot to life. Anyone can easily learn to build and program their own robots with Arduino for hobby and commercial uses, making Arduino-based robots the popular choice for school projects, college courses, and the rapid prototyping of industrial applications! Practical Arduino Robotics is a comprehensive guide that equips you with the necessary skills and techniques that can be applied to various projects and applications, from automating repetitive tasks in a laboratory to building engaging mobile robots. Building on basic knowledge of programming and electronics, this book teaches you how to choose the right components, such as Arduino boards, sensors, and motors, and write effective code for your robotics project, including the use of advanced third-party Arduino libraries and interfaces, such as Analog, SPI, I2C, PWM, and UART. You'll also learn different ways to command your robots wirelessly, such as over Wi-Fi. Finally, with basic to advanced project examples, this book illustrates how to build exciting autonomous robots like a self-balancing telepresence robot. By the end of this book, you'll be able to design and create your own custom robots for a wide variety of applications.
Table of Contents (21 chapters)
1
Part 1: Selecting the Right Components for Your Robots
6
Part 2: Writing Effective and Reliable Robot Programs for Arduino
10
Part 3: Building the Hardware, Electronics, and UI of Your Robot
15
Part 4: Advanced Example Projects to Put Your Robotic Skills into Action

Integrating the camera

Now, let us turn your mobile base into a robot with a camera that can follow a line. To that end, we need to integrate one more component – the camera. Cameras are not a very common sensor for DIY Arduino robots since they produce a lot of data that is difficult to process on a small microcontroller. To circumvent this problem, the PixyCam modules (https://pixycam.com/) do all the image processing on board and let the Arduino access very high-level information, such as the location of color patches or the beginning and end of a line in an image. A PixyCam makes for a very powerful line sensor, and you can use it in many other interesting projects, such as sorting machines, object trackers, or even an automatic Rubik’s Cube solver. We will be using Pixy2.1, but other versions will work just as well.

Electrical integration

The Pixy camera runs off 5V and can communicate with the Arduino board over SPI, which makes the electrical integration...