Getting Started with Python and Raspberry Pi

Learn to design and implement reliable Python applications on the Raspberry Pi using a range of external libraries, the Raspberry Pis GPIO port, and the camera module

Getting Started with Python and Raspberry Pi

This ebook is included in a Mapt subscription
Dan Nixon

1 customer reviews
Learn to design and implement reliable Python applications on the Raspberry Pi using a range of external libraries, the Raspberry Pis GPIO port, and the camera module
$0.00
$31.99
$39.99
$29.99p/m after trial
RRP $31.99
RRP $39.99
Subscription
eBook
Print + eBook
Start 30 Day Trial
Subscribe and access every Packt eBook & Video.
 
  • 4,000+ eBooks & Videos
  • 40+ New titles a month
  • 1 Free eBook/Video to keep every month
Start Free Trial
 
Preview in Mapt

Book Details

ISBN 139781783551590
Paperback200 pages

Book Description

The Raspberry Pi is one of the smallest and most affordable single board computers that has taken over the world of hobby electronics and programming, and the Python programming language makes this the perfect platform to start coding with.

The book will start with a brief introduction to Raspberry Pi and Python. We will direct you to the official documentation that helps you set up your Raspberry Pi with the necessary equipment such as the monitor, keyboard, mouse, power supply, and so on. It will then dive right into the basics of Python programming. Later, it will focus on other Python tasks, for instance, interfacing with hardware, GUI programming, and more. Once you get well versed with the basic programming, the book will then teach you to develop Python/Raspberry Pi applications.

By the end of this book, you will be able to develop Raspberry Pi applications with Python and will have good understanding of Python programming for Raspberry Pi.

Table of Contents

Chapter 1: Your First Steps with Python on the Pi
Installing and setting up Raspbian
The Python development tools
Running some simple Python scripts
Summary
Chapter 2: Understanding Control Flow and Data Types
Data in Python
Control flow operators
Using functions
Summary
Chapter 3: Working with Data Structures and I/O
Data structures
Input/output
Summary
Chapter 4: Understanding Object-oriented Programming and Threading
Object-oriented programming
Classes in Python
Threading
Summary
Chapter 5: Packaging Code with setuptools
Using packages in your Python code
Packaging your own Python modules
Summary
Chapter 6: Accessing the GPIO Pins
Digital electronics
The GPIO library
Universal Asynchronous Receiver/Transmitter (UART)
Additional libraries
Summary
Chapter 7: Using the Camera Module
Setting up the camera module
Installing and testing the Python library
Writing applications for the camera
Summary
Chapter 8: Extracting Data from the Internet
Using urllib2 to download data
Parsing JSON APIs
Parsing XML APIs
Parsing a web page using BeautifulSoup
Summary
Chapter 9: Creating Command-line Interfaces
Unit conversion application
Command-line interface
Summary
Chapter 10: Debugging Applications with PDB and Log Files
The Python debugger
Writing log files
Unit testing
Summary
Chapter 11: Designing Your GUI with Qt
Setting up the codebase
Building the UI with Qt Designer
Writing the UI code
Launching the UI
Packaging the code
Summary

What You Will Learn

  • Fundamentals of Python applications
  • Designing applications for multi-threading
  • Interacting with electronics and physical devices
  • Debugging applications when they go wrong
  • Packaging and installing Python modules
  • User interface design using Qt
  • Building easy to use command-line interfaces
  • Connecting applications to the Internet

Authors

Table of Contents

Chapter 1: Your First Steps with Python on the Pi
Installing and setting up Raspbian
The Python development tools
Running some simple Python scripts
Summary
Chapter 2: Understanding Control Flow and Data Types
Data in Python
Control flow operators
Using functions
Summary
Chapter 3: Working with Data Structures and I/O
Data structures
Input/output
Summary
Chapter 4: Understanding Object-oriented Programming and Threading
Object-oriented programming
Classes in Python
Threading
Summary
Chapter 5: Packaging Code with setuptools
Using packages in your Python code
Packaging your own Python modules
Summary
Chapter 6: Accessing the GPIO Pins
Digital electronics
The GPIO library
Universal Asynchronous Receiver/Transmitter (UART)
Additional libraries
Summary
Chapter 7: Using the Camera Module
Setting up the camera module
Installing and testing the Python library
Writing applications for the camera
Summary
Chapter 8: Extracting Data from the Internet
Using urllib2 to download data
Parsing JSON APIs
Parsing XML APIs
Parsing a web page using BeautifulSoup
Summary
Chapter 9: Creating Command-line Interfaces
Unit conversion application
Command-line interface
Summary
Chapter 10: Debugging Applications with PDB and Log Files
The Python debugger
Writing log files
Unit testing
Summary
Chapter 11: Designing Your GUI with Qt
Setting up the codebase
Building the UI with Qt Designer
Writing the UI code
Launching the UI
Packaging the code
Summary

Book Details

ISBN 139781783551590
Paperback200 pages
Read More
From 1 reviews

Read More Reviews