Raspberry Pi 3 Cookbook for Python Programmers - Third Edition

A recipe-based guide to programming your Raspberry Pi 3 using Python
Preview in Mapt

Raspberry Pi 3 Cookbook for Python Programmers - Third Edition

Tim Cox, Dr. Steven Lawrence Fernandes
New Release!

A recipe-based guide to programming your Raspberry Pi 3 using Python
Mapt Subscription
FREE
$29.99/m after trial
eBook
$19.60
RRP $27.99
Save 29%
Print + eBook
$34.99
RRP $34.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$19.60
$34.99
$29.99 p/m after trial
RRP $27.99
RRP $34.99
Subscription
eBook
Print + eBook
Start 14 Day Trial

Frequently bought together


Raspberry Pi 3 Cookbook for Python Programmers - Third Edition Book Cover
Raspberry Pi 3 Cookbook for Python Programmers - Third Edition
$ 27.99
$ 19.60
Raspberry Pi for Python Programmers Cookbook - Second Edition Book Cover
Raspberry Pi for Python Programmers Cookbook - Second Edition
$ 35.99
$ 25.20
Buy 2 for $35.00
Save $28.98
Add to Cart

Book Details

ISBN 139781788629874
Paperback552 pages

Book Description

Raspberry Pi 3 Cookbook for Python Programmers – Third Edition begins by guiding you through setting up Raspberry Pi 3, performing tasks using Python 3.6, and introducing the first steps to interface with electronics. As you work through each chapter, you will build your skills and apply them as you progress. You will learn how to build text classifiers, predict sentiments in words, develop applications using the popular Tkinter library, and create games by controlling graphics on your screen. You will harness the power of a built in graphics processor using Pi3D to generate your own high-quality 3D graphics and environments.

You will understand how to connect Raspberry Pi’s hardware pins directly to control electronics, from switching on LEDs and responding to push buttons to driving motors and servos. Get to grips with monitoring sensors to gather real-life data, using it to control other devices, and viewing the results over the internet. You will apply what you have learned by creating your own Pi-Rover or Pi-Hexipod robots. You will also learn about sentiment analysis, face recognition techniques, and building neural network modules for optical character recognition.

Finally, you will learn to build movie recommendations system on Raspberry Pi 3.

Table of Contents

Chapter 1: Getting Started with a Raspberry Pi 3 Computer
Introduction
Connecting to Raspberry Pi
Using NOOBS to set up your Raspberry Pi SD card
Networking and connecting your Raspberry Pi to the internet via an Ethernet port, using a CAT6 Ethernet cable
Using built-in Wi-Fi and Bluetooth on Raspberry Pi
Configuring your network manually
Networking directly to a laptop or computer
Networking and connecting your Raspberry Pi to the internet via a USB Wi-Fi dongle
Connecting to the internet through a proxy server
Connecting remotely to Raspberry Pi over the network using VNC
Connecting remotely to Raspberry Pi over the network using SSH (and X11 forwarding)
Sharing the home folder of Raspberry Pi with SMB
Keeping Raspberry Pi up to date
Chapter 2: Dividing Text Data and Building Text Classifiers
Introduction
Building a text classifier
Pre-processing data using tokenization
Stemming text data
Dividing text using chunking
Building a bag-of-words model
Applications of text classifiers
Chapter 3: Using Python for Automation and Productivity
Introduction
Using Tkinter to create graphical user interfaces
Creating a graphical application – Start menu
Displaying photo information in an application
Organizing your photos automatically
Chapter 4: Predicting Sentiments in Words
Building a Naive Bayes classifier
Logistic regression classifier
Splitting the dataset for training and testing
Evaluating the accuracy using cross-validation
Analyzing the sentiment of a sentence
Identifying patterns in text using topic modeling
Applications of sentiment analysis
Chapter 5: Creating Games and Graphics
Introduction
Using IDLE3 to debug your programs
Drawing lines using a mouse on Tkinter Canvas
Creating a bat and ball game
Creating an overhead scrolling game
Chapter 6: Detecting Edges and Contours in Images
Introduction
Loading, displaying, and saving images
Image flipping
Image scaling
Erosion and dilation
Image segmentation
Blurring and sharpening images
Detecting edges in images
Histogram equalization
Detecting corners in images
Chapter 7: Creating 3D Graphics
Introduction
Getting started with 3D coordinates and vertices
Creating and importing 3D models
Creating a 3D world to explore
Building 3D maps and mazes
Chapter 8: Building Face Detector and Face Recognition Applications
Introduction
Building a face detector application
Building a face recognition application
Applications of a face recognition system
Chapter 9: Using Python to Drive Hardware
Introduction
Controlling an LED
Responding to a button
A controlled shutdown button
The GPIO keypad input
Multiplexed color LEDs
Writing messages using persistence of vision
Chapter 10: Sensing and Displaying Real-World Data
Introduction
Using devices with the I2C bus
Reading analog data using an analog-to-digital converter
Logging and plotting data
Extending the Raspberry Pi GPIO with an I/O expander
Capturing data in an SQLite database
Viewing data from your own webserver
Sensing and sending data to online services
Chapter 11: Building Neural Network Modules for Optical Character Recognition
Introduction
Visualizing optical characters
Building an optical character recognizer using neural networks
Applications of an OCR system
Chapter 12: Building Robots
Introduction
Building a Rover-Pi robot with forward driving motors
Using advanced motor control
Building a six-legged Pi-Bug robot
Controlling servos directly with ServoBlaster
Using an infrared remote control with your Raspberry Pi
Avoiding objects and obstacles
Getting a sense of direction
Chapter 13: Interfacing with Technology
Introduction
Automating your home with remotely controlled electrical sockets
Using SPI to control an LED matrix
Communicating using a serial interface
Controlling Raspberry Pi using Bluetooth
Controlling USB devices
Chapter 14: Can I Recommend a Movie for You?
Introduction
Computing the Euclidean distance score
Computing a Pearson correlation score
Finding similar users in the dataset
Developing a movie recommendation module
Applications of recommender systems

What You Will Learn

  • Learn to set up and run Raspberry Pi 3
  • Build text classifiers and perform automation using Python
  • Predict sentiments in words and create games and graphics
  • Detect edges and contours in images
  • Build human face detection and recognition system
  • Use Python to drive hardware
  • Sense and display real-world data
  • Build a neural network module for optical character recognition
  • Build movie recommendations system

Authors

Table of Contents

Chapter 1: Getting Started with a Raspberry Pi 3 Computer
Introduction
Connecting to Raspberry Pi
Using NOOBS to set up your Raspberry Pi SD card
Networking and connecting your Raspberry Pi to the internet via an Ethernet port, using a CAT6 Ethernet cable
Using built-in Wi-Fi and Bluetooth on Raspberry Pi
Configuring your network manually
Networking directly to a laptop or computer
Networking and connecting your Raspberry Pi to the internet via a USB Wi-Fi dongle
Connecting to the internet through a proxy server
Connecting remotely to Raspberry Pi over the network using VNC
Connecting remotely to Raspberry Pi over the network using SSH (and X11 forwarding)
Sharing the home folder of Raspberry Pi with SMB
Keeping Raspberry Pi up to date
Chapter 2: Dividing Text Data and Building Text Classifiers
Introduction
Building a text classifier
Pre-processing data using tokenization
Stemming text data
Dividing text using chunking
Building a bag-of-words model
Applications of text classifiers
Chapter 3: Using Python for Automation and Productivity
Introduction
Using Tkinter to create graphical user interfaces
Creating a graphical application – Start menu
Displaying photo information in an application
Organizing your photos automatically
Chapter 4: Predicting Sentiments in Words
Building a Naive Bayes classifier
Logistic regression classifier
Splitting the dataset for training and testing
Evaluating the accuracy using cross-validation
Analyzing the sentiment of a sentence
Identifying patterns in text using topic modeling
Applications of sentiment analysis
Chapter 5: Creating Games and Graphics
Introduction
Using IDLE3 to debug your programs
Drawing lines using a mouse on Tkinter Canvas
Creating a bat and ball game
Creating an overhead scrolling game
Chapter 6: Detecting Edges and Contours in Images
Introduction
Loading, displaying, and saving images
Image flipping
Image scaling
Erosion and dilation
Image segmentation
Blurring and sharpening images
Detecting edges in images
Histogram equalization
Detecting corners in images
Chapter 7: Creating 3D Graphics
Introduction
Getting started with 3D coordinates and vertices
Creating and importing 3D models
Creating a 3D world to explore
Building 3D maps and mazes
Chapter 8: Building Face Detector and Face Recognition Applications
Introduction
Building a face detector application
Building a face recognition application
Applications of a face recognition system
Chapter 9: Using Python to Drive Hardware
Introduction
Controlling an LED
Responding to a button
A controlled shutdown button
The GPIO keypad input
Multiplexed color LEDs
Writing messages using persistence of vision
Chapter 10: Sensing and Displaying Real-World Data
Introduction
Using devices with the I2C bus
Reading analog data using an analog-to-digital converter
Logging and plotting data
Extending the Raspberry Pi GPIO with an I/O expander
Capturing data in an SQLite database
Viewing data from your own webserver
Sensing and sending data to online services
Chapter 11: Building Neural Network Modules for Optical Character Recognition
Introduction
Visualizing optical characters
Building an optical character recognizer using neural networks
Applications of an OCR system
Chapter 12: Building Robots
Introduction
Building a Rover-Pi robot with forward driving motors
Using advanced motor control
Building a six-legged Pi-Bug robot
Controlling servos directly with ServoBlaster
Using an infrared remote control with your Raspberry Pi
Avoiding objects and obstacles
Getting a sense of direction
Chapter 13: Interfacing with Technology
Introduction
Automating your home with remotely controlled electrical sockets
Using SPI to control an LED matrix
Communicating using a serial interface
Controlling Raspberry Pi using Bluetooth
Controlling USB devices
Chapter 14: Can I Recommend a Movie for You?
Introduction
Computing the Euclidean distance score
Computing a Pearson correlation score
Finding similar users in the dataset
Developing a movie recommendation module
Applications of recommender systems

Book Details

ISBN 139781788629874
Paperback552 pages
Read More

Read More Reviews

Recommended for You

Raspberry Pi for Python Programmers Cookbook - Second Edition Book Cover
Raspberry Pi for Python Programmers Cookbook - Second Edition
$ 35.99
$ 25.20
Internet of Things with Raspberry Pi 3 Book Cover
Internet of Things with Raspberry Pi 3
$ 19.99
$ 14.00
RESTful Web API Design with Node.js 10 - Third Edition Book Cover
RESTful Web API Design with Node.js 10 - Third Edition
$ 23.99
$ 16.80
Ionic Cookbook -Third Edition Book Cover
Ionic Cookbook -Third Edition
$ 35.99
$ 25.20
Matplotlib for Python Developers - Second Edition Book Cover
Matplotlib for Python Developers - Second Edition
$ 31.99
$ 22.40
Introduction to Apache NiFi (Hortonworks DataFlow - HDF 2.0) [Video] Book Cover
Introduction to Apache NiFi (Hortonworks DataFlow - HDF 2.0) [Video]
$ 28.99
$ 24.65