Python Programming with Raspberry Pi

Become a master of Python programming using the small yet powerful Raspberry Pi Zero
Preview in Mapt

Python Programming with Raspberry Pi

Sai Yamanoor, Srihari Yamanoor

1 customer reviews
Become a master of Python programming using the small yet powerful Raspberry Pi Zero
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


Python Programming with Raspberry Pi Book Cover
Python Programming with Raspberry Pi
$ 27.99
$ 19.60
Raspberry Pi: Amazing Projects from Scratch Book Cover
Raspberry Pi: Amazing Projects from Scratch
$ 59.99
$ 42.00
Buy 2 for $35.00
Save $52.98
Add to Cart

Book Details

ISBN 139781786467577
Paperback312 pages

Book Description

Raspberry Pi Zero is a super-small and super-affordable product from Raspberry Pi that is packed with a plethora of features and has grabbed the notice of programmers, especially those who use Python.

This step-by-step guide will get you developing practical applications in Python using a Raspberry Pi Zero. It will become a valuable resource as you learn the essential details of interfacing sensors and actuators to a Raspberry Pi, as well as acquiring and displaying data.

You will get started by writing a Python program that blinks an LED at 1-second intervals. Then you will learn to write simple logic to execute tasks based upon sensor data (for example, to control a motor) and retrieve data from the web (such as to check e-mails to provide a visual alert). Finally, you will learn to build a home automation system with Python where different appliances are controlled using the Raspberry Pi.

The examples discussed in each chapter of this book culminate in a project that help improve the quality of people’s lives.

Table of Contents

Chapter 1: Getting Started with Python and the Raspberry Pi Zero
Let's get started!
Introduction to the Raspberry Pi Zero
The setup of the Raspberry Pi Zero
Let's learn Python!
The Hello World example
Summary
Chapter 2: Arithmetic Operations, Loops, and Blinky Lights
Hardware required for this chapter
Arithmetic operations
Bitwise operators in Python
Logical operators
Data types and variables in Python
Reading inputs from the user
Loops in Python
Raspberry Pi's GPIO
Summary
Chapter 3: Conditional Statements, Functions, and Lists
Conditional statements
Functions in Python
Some mini-project challenges for the reader
Summary
Chapter 4: Communication Interfaces
UART – serial port
The SPI interface
Summary
Chapter 5: Data Types and Object-Oriented Programming in Python
Lists
Dictionaries
Tuples
Sets
OOP in Python
Speaker controller
Summary
Chapter 6: File I/O and Python Utilities
File I/O
Python utilities
Summary
Chapter 7: Requests and Web Frameworks
The try/except keywords
Connecting to the Internet – web requests
Flask web framework
Summary
Chapter 8: Awesome Things You Could Develop Using Python
Image processing using a Raspberry Pi Zero
Speech recognition
Automating routing tasks
Improving daily commute
Improving your vocabulary
Logging
Threading in Python
PEP8 style guide for Python
Summary
Chapter 9: Lets Build a Robot!
Components of the robot
Setting up remote login
Chassis setup
Preparing the motor driver circuit
Raspberry Pi Zero and motor driver assembly
Camera setup
The web interface
Camera setup for the web interface
Buttons for robot control
Troubleshooting tips
Project enhancements
Summary
Chapter 10: Home Automation Using the Raspberry Pi Zero
Voice activated personal assistant
Web framework based appliance control/dashboard
Personal Health Improvement—Sitting is the new smoking
Smart lawn sprinkler
Summary
Chapter 11: Tips and Tricks
Change your Raspberry Pi's password
Setting up your development environment
VNC access to Raspberry Pi
The RUN switch of the Raspberry Pi Zero board
GPIO pin mapping

What You Will Learn

  • Configure Raspberry Pi using Python
  • Control loops to blink an LED using simple arithmetic operations
  • Understand how interface sensors, actuators, and LED displays work
  • Get to grips with every aspect of Python programming using practical examples
  • Explore machine vision, data visualization, and scientific computations
  • Build a mobile robot using the Raspberry Pi as the controller
  • Build a voice-activated home automation controller

Authors

Table of Contents

Chapter 1: Getting Started with Python and the Raspberry Pi Zero
Let's get started!
Introduction to the Raspberry Pi Zero
The setup of the Raspberry Pi Zero
Let's learn Python!
The Hello World example
Summary
Chapter 2: Arithmetic Operations, Loops, and Blinky Lights
Hardware required for this chapter
Arithmetic operations
Bitwise operators in Python
Logical operators
Data types and variables in Python
Reading inputs from the user
Loops in Python
Raspberry Pi's GPIO
Summary
Chapter 3: Conditional Statements, Functions, and Lists
Conditional statements
Functions in Python
Some mini-project challenges for the reader
Summary
Chapter 4: Communication Interfaces
UART – serial port
The SPI interface
Summary
Chapter 5: Data Types and Object-Oriented Programming in Python
Lists
Dictionaries
Tuples
Sets
OOP in Python
Speaker controller
Summary
Chapter 6: File I/O and Python Utilities
File I/O
Python utilities
Summary
Chapter 7: Requests and Web Frameworks
The try/except keywords
Connecting to the Internet – web requests
Flask web framework
Summary
Chapter 8: Awesome Things You Could Develop Using Python
Image processing using a Raspberry Pi Zero
Speech recognition
Automating routing tasks
Improving daily commute
Improving your vocabulary
Logging
Threading in Python
PEP8 style guide for Python
Summary
Chapter 9: Lets Build a Robot!
Components of the robot
Setting up remote login
Chassis setup
Preparing the motor driver circuit
Raspberry Pi Zero and motor driver assembly
Camera setup
The web interface
Camera setup for the web interface
Buttons for robot control
Troubleshooting tips
Project enhancements
Summary
Chapter 10: Home Automation Using the Raspberry Pi Zero
Voice activated personal assistant
Web framework based appliance control/dashboard
Personal Health Improvement—Sitting is the new smoking
Smart lawn sprinkler
Summary
Chapter 11: Tips and Tricks
Change your Raspberry Pi's password
Setting up your development environment
VNC access to Raspberry Pi
The RUN switch of the Raspberry Pi Zero board
GPIO pin mapping

Book Details

ISBN 139781786467577
Paperback312 pages
Read More
From 1 reviews

Read More Reviews

Recommended for You

Raspberry Pi: Amazing Projects from Scratch Book Cover
Raspberry Pi: Amazing Projects from Scratch
$ 59.99
$ 42.00
Build Supercomputers with Raspberry Pi 3 Book Cover
Build Supercomputers with Raspberry Pi 3
$ 31.99
$ 22.40
Full Stack Web Development with Raspberry Pi 3 Book Cover
Full Stack Web Development with Raspberry Pi 3
$ 27.99
$ 19.60
Raspberry Pi Zero W Wireless Projects Book Cover
Raspberry Pi Zero W Wireless Projects
$ 27.99
$ 19.60
Modern Python Cookbook Book Cover
Modern Python Cookbook
$ 39.99
$ 28.00
Raspberry Pi Robotic Projects - Third Edition Book Cover
Raspberry Pi Robotic Projects - Third Edition
$ 31.99
$ 22.40