Hands-On Robotics Programming with C++
eBook - ePub

Hands-On Robotics Programming with C++

Leverage Raspberry Pi 3 and C++ libraries to build intelligent robotics applications

Dinesh Tavasalkar

Partager le livre
  1. 312 pages
  2. English
  3. ePUB (adapté aux mobiles)
  4. Disponible sur iOS et Android
eBook - ePub

Hands-On Robotics Programming with C++

Leverage Raspberry Pi 3 and C++ libraries to build intelligent robotics applications

Dinesh Tavasalkar

DĂ©tails du livre
Aperçu du livre
Table des matiĂšres
Citations

À propos de ce livre

Enhance your programming skills to build exciting robotic projects

Key Features

  • Build an intelligent robot that can detect and avoid obstacles and respond to voice commands
  • Detect and track objects and faces using OpenCV
  • Control your robot with a GUI button designed using Qt5

Book Description

C++ is one of the most popular legacy programming languages for robotics, and a combination of C++ and robotics hardware is used in many leading industries. This book will bridge the gap between Raspberry Pi and C/C++ programming and enable you to develop applications for Raspberry Pi. To follow along with the projects covered in the book, you can implement C programs in Raspberry Pi with the wiringPi library.

With this book, you'll develop a fully functional car robot and write programs to move it in different directions. You'll then create an obstacle - avoiding robot using an ultrasonic sensor. Furthermore, you'll find out how to control the robot wirelessly using your PC/Mac. This book will also help you work with object detection and tracking using OpenCV, and guide you through exploring face detection techniques. Finally, you will create an Android app and control the robot wirelessly with an Android smartphone.

By the end of this book, you will have gained experience in developing a robot using Raspberry Pi and C/C++ programming.

What you will learn

  • Install software in Raspberry Pi compatible with C++ programming
  • Program the Raspberry Pi in C++ to run a motor
  • Control RPi-powered robot wirelessly with your laptop or PC
  • Program an RPi camera using OpenCV Control a Raspberry Pi robot with voice commands
  • Implement face and object detection with Raspberry Pi

Who this book is for

This book is for developers, programmers, and robotics enthusiasts interested in leveraging C++ to build exciting robotics applications. Prior knowledge of C++ is necessary to understand the projects covered in this book.

Foire aux questions

Comment puis-je résilier mon abonnement ?
Il vous suffit de vous rendre dans la section compte dans paramĂštres et de cliquer sur « RĂ©silier l’abonnement ». C’est aussi simple que cela ! Une fois que vous aurez rĂ©siliĂ© votre abonnement, il restera actif pour le reste de la pĂ©riode pour laquelle vous avez payĂ©. DĂ©couvrez-en plus ici.
Puis-je / comment puis-je télécharger des livres ?
Pour le moment, tous nos livres en format ePub adaptĂ©s aux mobiles peuvent ĂȘtre tĂ©lĂ©chargĂ©s via l’application. La plupart de nos PDF sont Ă©galement disponibles en tĂ©lĂ©chargement et les autres seront tĂ©lĂ©chargeables trĂšs prochainement. DĂ©couvrez-en plus ici.
Quelle est la différence entre les formules tarifaires ?
Les deux abonnements vous donnent un accĂšs complet Ă  la bibliothĂšque et Ă  toutes les fonctionnalitĂ©s de Perlego. Les seules diffĂ©rences sont les tarifs ainsi que la pĂ©riode d’abonnement : avec l’abonnement annuel, vous Ă©conomiserez environ 30 % par rapport Ă  12 mois d’abonnement mensuel.
Qu’est-ce que Perlego ?
Nous sommes un service d’abonnement Ă  des ouvrages universitaires en ligne, oĂč vous pouvez accĂ©der Ă  toute une bibliothĂšque pour un prix infĂ©rieur Ă  celui d’un seul livre par mois. Avec plus d’un million de livres sur plus de 1 000 sujets, nous avons ce qu’il vous faut ! DĂ©couvrez-en plus ici.
Prenez-vous en charge la synthÚse vocale ?
Recherchez le symbole Écouter sur votre prochain livre pour voir si vous pouvez l’écouter. L’outil Écouter lit le texte Ă  haute voix pour vous, en surlignant le passage qui est en cours de lecture. Vous pouvez le mettre sur pause, l’accĂ©lĂ©rer ou le ralentir. DĂ©couvrez-en plus ici.
Est-ce que Hands-On Robotics Programming with C++ est un PDF/ePUB en ligne ?
Oui, vous pouvez accĂ©der Ă  Hands-On Robotics Programming with C++ par Dinesh Tavasalkar en format PDF et/ou ePUB ainsi qu’à d’autres livres populaires dans Computer Science et Home Automation. Nous disposons de plus d’un million d’ouvrages Ă  dĂ©couvrir dans notre catalogue.

Informations

Année
2019
ISBN
9781789131079
Édition
1
Sous-sujet
Home Automation

Section 1: Getting Started with wiringPi on a Raspberry Pi

In this section, you will first be introduced to the basics of Raspberry Pi and learn how to install the Raspbian OS on your Raspberry Pi. Next, you will work with the wiringPi library and execute your first C program on Raspberry Pi.
The following chapters are included in this section:
  • Chapter 1, Introduction to the Raspberry Pi
  • Chapter 2, Implementing Blink with wiringPi

Introduction to the Raspberry Pi

Initially developed with the idea of teaching and promoting basic computer programming in schools across the UK, the Raspberry Pi (RPi) became an instant hit. At a price of just $25 when it was initially released, it became so popular that it was, and still is, used by developers, hobbyists, and engineers all over the world.
In this chapter, you will explore the basic idea of a Raspberry Pi. You will then learn to install an operating system on the device. Finally, you will configure Wi-Fi on your Raspberry Pi and learn to connect it to a laptop over Wi-Fi and set up a remote desktop.
You will achieve each of these objectives through the following topics:
  • Understanding the Raspberry Pi
  • Installing Raspbian OS on a Raspberry Pi 3B+
  • Connecting a Raspberry Pi 3B+ to a laptop via Wi-Fi
  • Installing Raspbian OS on a Raspberry Pi Zero W
  • Connecting a Raspberry Pi Zero W to a laptop via Wi-Fi

Technical requirements

For this chapter, the following software and hardware will be required.

Software required

Please download the following software if you want to follow along with the instructions in this chapter:
  • Raspbian Stretch: Raspbian Stretch is the operating system (OS) that we will write to a microSD card. Stretch is the OS that will run our Raspberry Pi. It can be downloaded from https://www.raspberrypi.org/downloads/raspbian/ This OS is developed specifically for the Raspberry Pi.
  • Balena Etcher: This software will format the microSD card and write the Raspbian Stretch image to the microSD card. It can be downloaded from https://www.balena.io/etcher/.
  • PuTTY: We will use PuTTY to connect our Raspberry Pi to a Wi-Fi network and find the IP address that the Wi-Fi network assigns to it. It can be downloaded from https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html.
  • VNC Viewer: With VNC Viewer, we will be able to view the Raspberry Pi display on our laptop. It can be downloaded from https://www.realvnc.com/en/connect/download/viewer/.
  • Bonjour: This is generally used to connect printers to computers over Wi-Fi. It can be downloaded from https://support.apple.com/kb/DL999?viewlocale=en_MY&locale=en_MY.
  • Notepad++: We will need Notepad++ to edit the code in the Raspbian Stretch image. It can be downloaded from https://notepad-plus-plus.org/download/v7.5.9.html.
  • Brackets: Brackets allows those using macOS to edit the code in the Rapbian Stretch image. To download Brackets, go to http://www.brackets.io/.
The installation of all of this software is pretty straightforward. Keep the default settings checked, click on the Next button a few times, and then hit the Finish button once the installation is complete.

Hardware requirements

We need the following hardware to follow along with the instructions in this chapter.

For Raspberry Pi 3B+ and Raspberry Pi Zero W

If you use the Raspberry Pi 3B+ or the Raspberry Pi Zero W, you will need the following hardware:
  • Keyboard
  • Mouse
  • SD card—this should have a minimum of 8 GB of storage, but 32 GB is recommended
  • MicroSD card reader
  • Display unit—a computer monitor or TV that contains an HDMI port
  • HDMI cable
  • 5V mobile charger or power bank. This will power the Raspberry Pi

Additional hardware for Raspberry Pi 3B+

The Raspberry Pi 3B+ needs the following additional hardware:
  • An Ethernet cable

Additional hardware requirements for Raspberry Pi Zero W

Since the Raspberry Pi Zero has a micro USB port and a Micro HDMI port, it needs the following additional hardware:
  • A USB hub
  • A micro USB B-to-USB connector (also known as an OTG connector)
  • An HDMI-to-mini HDMI connector

Understanding the Raspberry Pi

Raspberry Pi is a credit card sized, Linux-based minicomputer invented by the Raspberry Pi Foundation in 2012. The first Raspberry Pi model was called the Raspberry Pi 1B, which was t...

Table des matiĂšres