Book description
Become a master of Python programming using the small yet powerful Raspberry Pi Zero
About This Book
This is the first book on the market that teaches Python programming with Raspberry Pi Zero
Develop exciting applications such as a mobile robot and home automation controller using Python
This step-by-step guide helps you make the most out of Raspberry Pi Zero using Python programming
Who This Book Is For
This book is aimed at hobbyists and programmers who want to learn Python programming and develop applications using the Pi Zero. They should have basic familiarity with electronics.
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
In Detail
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.
Style and approach
This will be a learning, step-by-step guide to teach Python programming using the famous Raspberry Pi Zero. The book is packed with practical examples at every step along with tips and tricks for the Raspberry Pi fans
Table of contents
- Preface
- Getting Started with Python and the Raspberry Pi Zero
- Arithmetic Operations, Loops, and Blinky Lights
- Conditional Statements, Functions, and Lists
-
Communication Interfaces
- UART - serial port
- The SPI interface
- Summary
-
Data Types and Object-Oriented Programming in Python
-
Lists
-
Operations that could be performed on a list
- Append element to list:
- Remove element from list:
- Retrieving the index of an element
- Popping an element from the list
- Counting the instances of an element:
- Inserting element at a specific position:
- Extending a list
- Clearing the elements of a list
- Sorting the elements of a list
- Reverse the order of elements in list
- Create copies of a list
- Accessing list elements
- List membership
- Let's build a simple game!
-
Operations that could be performed on a list
- Dictionaries
- Tuples
- Sets
- OOP in Python
- Speaker controller
- Summary
-
Lists
- File I/O and Python Utilities
- Requests and Web Frameworks
- Awesome Things You Could Develop Using Python
- Lets Build a Robot!
- Home Automation Using the Raspberry Pi Zero
- Tips and Tricks
Product information
- Title: Python Programming with Raspberry Pi
- Author(s):
- Release date: April 2017
- Publisher(s): Packt Publishing
- ISBN: 9781786467577
You might also like
book
Python Programming for Arduino
Develop practical Internet of Things prototypes and applications with Arduino and Python In Detail The future …
book
Learn Raspberry Pi Programming with Python: Learn to Program on the World's Most Popular Tiny Computer
Learn how to program your nifty new $35 computer to make a web spider, a weather …
book
Raspberry Pi 3 Cookbook for Python Programmers - Third Edition
A recipe-based guide to programming your Raspberry Pi 3 using Python About This Book Leverage the …
book
Learning Computer Architecture with Raspberry Pi
Use your Raspberry Pi to get smart about computing fundamentals In the 1980s, the tech revolution …