Programming the Raspberry Pi, Third Edition: Getting Started with Python
An up-to-date guide to creating your own fun and useful Raspberry Pi™ programs

This fully updated guide shows how to create inventive programs and fun games on your powerful Raspberry Pi—with no programming experience required. Programming the Raspberry Pi™: Getting Started with Python, Third Edition addresses physical changes and new setup procedures as well as OS updates to the current version 4. You will discover how to configure hardware and software, write Python scripts, create user-friendly GUIs, and control external electronics. Step-by-step projects include a digital clock prototype and a fully functioning Raspberry Pi robot.

  • Configure your Raspberry Pi and explore its features
  • Start writing and debugging Python programs
  • Use strings, lists, functions, and dictionaries
  • Work with modules, classes, and methods
  • Apply object-oriented development methods
  • Create user-friendly games using Pygame
  • Build intuitive user interfaces with guizero
  • Interface with hardware using the gpiozero library
  • Attach external electronics through the GPIO port
  • Add powerful Web features to your projects









1138403206
Programming the Raspberry Pi, Third Edition: Getting Started with Python
An up-to-date guide to creating your own fun and useful Raspberry Pi™ programs

This fully updated guide shows how to create inventive programs and fun games on your powerful Raspberry Pi—with no programming experience required. Programming the Raspberry Pi™: Getting Started with Python, Third Edition addresses physical changes and new setup procedures as well as OS updates to the current version 4. You will discover how to configure hardware and software, write Python scripts, create user-friendly GUIs, and control external electronics. Step-by-step projects include a digital clock prototype and a fully functioning Raspberry Pi robot.

  • Configure your Raspberry Pi and explore its features
  • Start writing and debugging Python programs
  • Use strings, lists, functions, and dictionaries
  • Work with modules, classes, and methods
  • Apply object-oriented development methods
  • Create user-friendly games using Pygame
  • Build intuitive user interfaces with guizero
  • Interface with hardware using the gpiozero library
  • Attach external electronics through the GPIO port
  • Add powerful Web features to your projects









15.0 In Stock
Programming the Raspberry Pi, Third Edition: Getting Started with Python

Programming the Raspberry Pi, Third Edition: Getting Started with Python

by Simon Monk
Programming the Raspberry Pi, Third Edition: Getting Started with Python

Programming the Raspberry Pi, Third Edition: Getting Started with Python

by Simon Monk

Paperback(3rd ed.)

$15.00 
  • SHIP THIS ITEM
    Qualifies for Free Shipping
  • PICK UP IN STORE

    Your local store may have stock of this item.

Related collections and offers


Overview

An up-to-date guide to creating your own fun and useful Raspberry Pi™ programs

This fully updated guide shows how to create inventive programs and fun games on your powerful Raspberry Pi—with no programming experience required. Programming the Raspberry Pi™: Getting Started with Python, Third Edition addresses physical changes and new setup procedures as well as OS updates to the current version 4. You will discover how to configure hardware and software, write Python scripts, create user-friendly GUIs, and control external electronics. Step-by-step projects include a digital clock prototype and a fully functioning Raspberry Pi robot.

  • Configure your Raspberry Pi and explore its features
  • Start writing and debugging Python programs
  • Use strings, lists, functions, and dictionaries
  • Work with modules, classes, and methods
  • Apply object-oriented development methods
  • Create user-friendly games using Pygame
  • Build intuitive user interfaces with guizero
  • Interface with hardware using the gpiozero library
  • Attach external electronics through the GPIO port
  • Add powerful Web features to your projects










Product Details

ISBN-13: 9781264257355
Publisher: McGraw Hill LLC
Publication date: 06/03/2021
Edition description: 3rd ed.
Pages: 192
Sales rank: 598,484
Product dimensions: 5.90(w) x 8.90(h) x 0.60(d)

About the Author

Simon Monk has authored 25 titles on electronics and programming. His books have sold nearly a million copies worldwide and have been translated into nine languages. He also designs products for Monk Makes, the business he runs with his wife.

Table of Contents

Preface xv

Acknowledgments xvii

Introduction xix

1 Introduction 1

What Is the Raspberry Pi? 1

What Can You Do with a Raspberry Pi? 3

A Tour of the Raspberry Pi 3

Setting Up Your Raspberry Pi 5

Buying What You Need 5

Connecting Everything Together 9

Booting Up 10

Summary 12

2 Getting Started 13

Linux 13

The Desktop 14

The Command Line 16

Navigating with the Terminal 17

Sudo 18

Applications 19

Internet Resources 20

Summary 20

3 Python Basics 21

Mu 21

Python Versions 22

Python Shell 22

Editor 23

Numbers 26

Variables 26

For Loops 28

Simulating Dice 29

If 32

Comparisons 33

Being Logical 33

Else 34

While 35

The Python Shell from the Terminal 36

Summary 37

4 Strings, Lists, and Dictionaries 39

String Theory 39

Lists 41

Functions 44

Hangman 45

Dictionaries 53

Tuples 54

Multiple Assignment 55

Multiple Return Values 55

Exceptions 56

Summary of Functions 56

Numbers 57

Strings 57

Lists 59

Dictionaries 59

Type Conversions 60

Summary 61

5 Modules, Classes, and Methods 63

Modules 63

Using Modules 64

Useful Python Libraries 65

Object Orientation 65

Defining Classes 66

Inheritance 68

Summary 71

6 Files and the Internet 73

Files 73

Reading Files 73

Reading Big Files 75

Writing Files 76

The File System 77

Pickling 78

JSON 79

Internet 80

Summary 83

7 Graphical User Interfaces 85

Guizero 85

Hello World 85

Temperature Converter 86

Other GUI Widgets 89

Pop-Ups 91

Menus 94

Summary 95

8 Games Programming 97

What Is Pygame? 97

Coordinates 97

Hello Pygame 98

A Raspberry Game 100

Following the Mouse 101

One Raspberry 102

Catch Detection and Scoring 104

Timing 104

Lots of Raspberries 105

Summary 108

9 Interfacing Hardware 109

GPIO Pin Connections 109

Pin Functions 110

Serial Interface Pins 111

Power Pins 111

Hat Pins 112

Breadboarding with Jumper Wires 112

Digital Outputs 112

Step 1 Put the Resistor on the Breadboard 113

Step 2 Put the LED on the Breadboard 114

Step 3 Connect the Breadboard to the GPIO Pins 114

Analog Outputs 117

Digital Inputs 119

Analog Inputs 120

Hardware 121

The Software 122

HATs 126

Summary 127

10 LED Fader Project 129

What You Need 130

Hardware Assembly 130

Software 131

Summary 133

11 Prototyping Project (Clock) 135

What You Need 136

Hardware Assembly 136

Software 138

Phase Two 140

Summary 143

12 Raspberry Pi Robot 145

Set Up the Raspberry Pi Zero W 146

Web-Controlled Rover 150

What You Need 150

Hardware 151

Software 151

Autonomous Rover 155

What You Need 156

Hardware 156

Software 158

Summary 160

13 What Next 161

Linux Resources 161

Python Resources 161

Raspberry Pi Resources 162

Programming Languages 163

Scratch 163

C 163

Other Languages 165

Applications and Projects 165

Media Center (Kodi) 165

Home Automation 166

Summary 166

Index 167

From the B&N Reads Blog

Customer Reviews