: Wolfram Donat
: Learn Raspberry Pi Programming with Python Learn to Program on the World's Most Popular Tiny Computer
: Apress
: 9781484237694
: 2
: CHF 50.60
:
: Hardware
: English
: 389
: Wasserzeichen/DRM
: PC/MAC/eReader/Tablet
: PDF
Lear how to program your nifty new $35 computer to make a web spider, a weather station, a media server, and more. This book explores how to make a variety of fun and even useful projects, from a web bot to search and download files to a toy to drive your pets insane.

Even if you're completely new to programming in general, you'll see how easy it is to create a home security system, an underwater photography system, an RC plane with a camera, and even a near-space weather balloon with a camera.  You'll learn how to use Pi with Arduino as well as Pi with Gertboard, an expansion board with an onboard ATmega microcontroller.

Learn Raspberry Pi Programming with Python has been fully updated in this new edition to cover the features of the new boards. You'll learn how to program in Python on your Raspberry Pi with hands-on examples and fun projects. 

What You'll Learn

    < i>Set up your new Raspberry Pi
  • Build unique projects across a range of interests
  • Program basic functions and processes using Python
Who This Book Is For

< iv>Readers who want to learn Python on a fun platform like the Pi and pick up some electronics skills along the way. No programming or Linux skill required, but a little experience with Linux will be helpful. Readers familiar with the 1st edition will enjoy the updated information in this new edition.

Wolfram Donat is a computer engineer, writer, and maker and is an expert on single-board computers like the Raspberry Pi, the Beagle board, and the BBC micro:bit. He is the author of several books, includingLearn Raspberry Pi Programming With Python, Make A Raspberry Pi-Controlled Robot, Getting Started with the BBC micro:bit,and Jumpstarting C. He is a best-selling author on Amazon and has received funding from NASA and others for his work in autonomous submersibles and computer vision.
Table of Contents5
About the Author15
About the Technical Reviewer16
Acknowledgments17
Preface18
Introduction20
Chapter 1: Introducing the Raspberry Pi22
The History of the Raspberry Pi24
Exploring the Pi29
The GPIO Pins30
USB30
3130
Audio Jack31
Camera Connector31
HDMI32
Power32
Display32
The System on a Chip33
SD Card33
Not Visible34
The Pi Zero/Zero W34
GPIO35
Camera Connector35
Power35
USB35
HDMI36
SD Card36
System on a Chip36
Not Visible36
Comparing the Raspberry Pi to Similar Devices37
Getting Started with the Pi37
Hardware Requirements of the Pi38
Connecting to Power38
Adding a Monitor38
Adding a USB Hub39
The Pi Operating System40
Formatting the Card41
Installing the OS41
Connecting the Peripherals42
Configuring the Pi43
Shutting Down the Pi46
Summary47
Chapter 2: Linux by the Seat of Your Pants48
Getting Started with Linux on the Pi51
Linux Files and the File System52
Root User Versus sudo53
Commands54
Exercise: Navigating in the Linux File System60
Shells in Linux63
Package Managers64
Text Editors66
Vim Versus emacs Versus nano67
Using Vim68
Using emacs70
Using nano72
Default Text Editor73
Summary74
Chapter 3: Introducing Python75
Scripting Versus a Programming Language76
The Python Philosophy79
Getting Started with Python81
Running Python Using IDLE81
Running Python Using the Terminal87
Running Python Using Scripts87
Exploring Python Data Types89
Numbers90
Strings91
Lists93
Dictionaries96
Tuples and Files97
Programming with Python99
IF tests100
Loops103
Functions106
Objects and Object-Oriented Programming108
Summary109
Chapter 4: Electronics at 100 MPH110
Basic Electricity Concepts112
Required Tools for Robotics115
Screwdrivers115
Pliers and Wire Strippers115
Wire Cutters118
Files119
Magnifying Light120
Hot-Glue Gun120
Assorted Glues121
Multimeter121
Power Supplies123
Breadboard124
Power Strip126
Soldering Iron127
General Safety Rules128
Working with Heat129
Working with Sharp Objects129
Wear Safety Glasses130
Fire Extinguishers at the Ready130
Keep a First-Aid Kit Handy131
Work in a Ventilated Area131
Organizing Your Workplace132
Bonus: Soldering Techniques134
Summary137
Chapter 5: The Web Bot138
Bot Etiquette140
The Connections of the Web142
Web Communications Protocols142
Web Page Formats143
A Request Example144
Our Web Bot Concept145
Parsing Web Pages145
Coding with Python Modules148
Using the Mechanize Module149
Parsing with Beautiful Soup150
Downloading with the urllib Library150
Deciding What to Download151
Choosing a Starting Point152
Storing Your Files152
Writing the Python Bot154
Reading a String and Extracting All the Links154
Looking For and Downloading Files155
Testing the Bot157
Creating Directories and Instantiating a List158
The Final Code161
Summary164
Chapter 6: The Weather Station165
A Shopping List of Parts167
Using the I2C Protocol168
Using an Anemometer169
Building the Anemometer170
Connecting the Anemometer to the Pi176
Correlating Revolutions per Second with Wind Speed177
Connecting the Digital Compass180
Connecting the Temperature/Humidity Sensor184
Connecting the Barometer186
Connecting the Bits189
The Final Code193
Summary196
Chapter 7: The Media Server197
A Shopping List of Parts198
Using an NTFS Drive198
Installing Samba202
Configuring Samba204
Setting Linux Permissions206
Restarting the Samba Service207
Connecting with Linux/OS X209
Kodi and Plex211
Where’s Python?214
Summary215
Chapter 8: The Home Security System216
Dogs as Security217
The Raspberry Pi as Security218
Using a Sensor Network219
Understanding a Pulldown Resistor220
A Shopping List of Parts221
Connecting to Your Network Wirelessly222
Accessing the GPIO Pins226
Sett