售 价:¥
温馨提示:数字商品不支持退换货,不提供源文件,不支持导出打印
为你推荐
Dedication
About Packt
Why subscribe?
Packt.com
Contributors
About the author
About the reviewers
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Download the color images
Conventions used
Get in touch
Reviews
Section 1: Getting Started with wiringPi on a Raspberry Pi
Introduction to the Raspberry Pi
Technical requirements
Software required
Hardware requirements
For Raspberry Pi 3B+ and Raspberry Pi Zero W
Additional hardware for Raspberry Pi 3B+
Additional hardware requirements for Raspberry Pi Zero W
Understanding the Raspberry Pi
The Raspberry Pi 3B+
The Raspberry Pi Zero W
Setting up a Raspberry Pi 3B+ as a desktop computer
Installing Raspbian OS on an SD card
Downloading and installing Etcher
Downloading the Raspbian Stretch image
Writing the Raspbian Stretch image to a microSD card
Setting up the Raspberry Pi 3B+
Connecting the Raspberry Pi 3B+ to the internet
Connecting the Raspberry Pi 3B+ to a laptop via Wi-Fi
Creating an SSH file on a microSD card
Connecting the Raspberry Pi 3B+ to a Wi-Fi network using PuTTY
Enabling the VNC server
Viewing the Raspberry Pi output on the VNC Viewer
Increase the VNC's screen resolution
Handling VNC and PuTTY errors
Setting up the Raspberry Pi Zero W as a desktop computer
Setting up the Raspberry Pi Zero W
Connecting the Raspberry Pi Zero W to a laptop via Wi-Fi
Connecting the Raspberry Pi Zero W to a Wi-Fi network using PuTTY
Enabling VNC Viewer for Raspberry Pi Zero W
Viewing Raspberry Pi Zero W output on VNC Viewer
Summary
Questions
Implementing Blink with wiringPi
Technical requirements
Installing the wiringPi library in the Raspberry Pi
Accessing Raspberry Pi GPIO pins via wiringPi
Making an LED blink
Wiring connections
The blinking program
Uploading the code to the Raspberry Pi
Smart light – working with digital sensor
The LDR sensor and the way it works
Wiring connection
Smart light program
Pulse Width Modulation using softPWM
How PWM works
The softPWM library
Making an LED blink with the softPWM library
Summary
Questions
Section 2: Raspberry Pi Robotics
Programming the Robot
Technical requirements
Choosing a robot chassis
Constructing and connecting the robot
Constructing the robot
Connecting the motor driver to the Raspberry Pi
What is a motor driver?
Wiring connections
Working with H-bridge
Moving the robot
Moving the robot backward
Stopping the robot
Different types of turns
Axial turns
Axial left turn
Axial right turn
Radial turn
Radial left turn
Radial right turn
Summary
Questions
Building an Obstacle-Avoiding Robot
Technical requirements
Using an ultrasonic sensor
How an ultrasonic sensor measures distances
The arithmetic equation for determining the time taken
Wiring the ultrasonic sensor to the Raspberry Pi
The HC-SR04 sensor program
Using an LCD
Wiring the 16x2 LCD to the Raspberry Pi
Programming the LCD
The LCD program
The LCD and the ultrasonic sensor program
What is the I2C protocol?
Wiring the I2C LCD and the Raspberry Pi
Programming the LCD with the I2C LCD module
The I2C LCD and the ultrasonic sensor program
Building an obstacle-avoiding robot
Wiring connections
Programming the obstacle-avoiding robot
Summary
Questions
Controlling a Robot Using a Laptop
Technical requirements
Installing the ncurses library
ncurses functions
Writing a HelloWorld program with ncurses
Compiling and running the program
Controlling LEDs and a buzzer using ncurses
Wiring connections
Writing the LEDBuzzer.cpp program
Controlling a rover using a laptop keyboard
Building a laptop-controlled rover program
Tracing a square path
Installing and setting up QT5
Setting up QT5
Controlling LEDs with GUI buttons
Creating a QT project
Dealing with errors
Controlling a rover using a laptop with QT5
Summary
Questions
Section 3: Face and Object Recognition Robot
Accessing the RPi Camera with OpenCV
Technical requirements
Installing OpenCV 4.0.0 on Raspberry Pi
Uninstalling Wolfram and LibreOffice
Updating your RPi
Installing the cmake, image, video, and gtk packages
Downloading and unzipping OpenCV 4.0 and its contribution repository
Installing Python
Compiling and installing OpenCV
Linking OpenCV to Python
Enabling and connecting the RPi camera to RPi
Connecting the RPi camera to RPi
Mounting the RPi camera on the robot
Capturing images and video with the RPi camera
Recording a video with the RPi camera
Installing the v4l2 driver
Reading an image using OpenCV
Summary
Questions
Building an Object-Following Robot with OpenCV
Technical requirements
Image processing with OpenCV
Important functions in OpenCV
Object recognition using OpenCV
Capturing the image
Finding the RGB pixel values
The object detection program
The OpenCV camera feed program
Building an object-following robot
Ball tracing using moments
Programming logic
The ball tracing program
Setting up the object-following robot
Object-following robot program
Summary
Questions
Face Detection and Tracking Using the Haar Classifier
Technical requirements
Face detection using the Haar cascade
Basic working of the Viola-Jones algorithm
Face-detection program
Detecting the eyes and smile
Detecting the eyes
Eye detection using haarcascade_eye
Eye detection using haarcascade_lefteye_2splits and haarcascade_righteye_2splits
Detecting the left eye
Detecting the right eye
Recognizing a smile
Programming logic for smile recognition
Face-tracking robot
Wiring connections
The programming logic
Using the white dot on the face triangle to move the robot
Summary
Questions
Section 4: Smartphone-Controlled Robot
Building a Voice-Controlled Robot
Technical requirements
An introduction to App Inventor
Creating a Talking Pi Android app
Designing the app
Programming the blocks
Main block
Intermediate block
Final block
The Talking Pi program
Importing and exporting the .aia file of the app
Creating a voice-controlled bot app
Designing the app
Adding and customizing the components
Programming the voice-controlled bot block
Pairing the Android smartphone and RPi via Bluetooth
Enabling the Bluetooth serial port
Developing the Bluetooth program for RPi
Socket programming
VoiceBot server program
Testing the code
Summary
Questions
Assessments
Chapter 1: Introduction to the Raspberry Pi
Chapter 2: Implementing Blink with wiringPi
Chapter 3: Programming the Robot
Chapter 4: Building an Obstacle-Avoiding Robot
Chapter 5: Controlling a Robot Using a Laptop
Chapter 6: Building an Object-Following Robot with OpenCV
Chapter 7: Accessing the RPi Camera with OpenCV
Chapter 8: Face Detection and Tracking Using the Haar Classifier
Chapter 9: Building a Voice-Controlled Robot
Other Books You May Enjoy
Leave a review - let other readers know what you think
买过这本书的人还买过
读了这本书的人还在读
同类图书排行榜