Nicht aus der Schweiz? Besuchen Sie lehmanns.de
Learn Raspberry Pi Programming with Python - Wolfram Donat

Learn Raspberry Pi Programming with Python (eBook)

Learn to Program on the World's Most Popular Tiny Computer

(Autor)

eBook Download: PDF
2018 | 2nd ed.
XXIV, 373 Seiten
Apress (Verlag)
978-1-4842-3769-4 (ISBN)
Systemvoraussetzungen
56,99 inkl. MwSt
(CHF 55,65)
Der eBook-Verkauf erfolgt durch die Lehmanns Media GmbH (Berlin) zum Preis in Euro inkl. MwSt.
  • Download sofort lieferbar
  • Zahlungsarten anzeigen
Learn 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

  • 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

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, including Learn 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.
Learn 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 LearnSet up your new Raspberry PiBuild unique projects across a range of interestsProgram basic functions and processes using PythonWho This Book Is ForReaders 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, including Learn 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 Contents 5
About the Author 15
About the Technical Reviewer 16
Acknowledgments 17
Preface 18
Introduction 20
Chapter 1: Introducing the Raspberry Pi 22
The History of the Raspberry Pi 24
Exploring the Pi 29
The GPIO Pins 30
USB & Ethernet
Audio Jack 31
Camera Connector 31
HDMI 32
Power 32
Display 32
The System on a Chip 33
SD Card 33
Not Visible 34
The Pi Zero/Zero W 34
GPIO 35
Camera Connector 35
Power 35
USB 35
HDMI 36
SD Card 36
System on a Chip 36
Not Visible 36
Comparing the Raspberry Pi to Similar Devices 37
Getting Started with the Pi 37
Hardware Requirements of the Pi 38
Connecting to Power 38
Adding a Monitor 38
Adding a USB Hub 39
The Pi Operating System 40
Formatting the Card 41
Installing the OS 41
Connecting the Peripherals 42
Configuring the Pi 43
Shutting Down the Pi 46
Summary 47
Chapter 2: Linux by the Seat of Your Pants 48
Getting Started with Linux on the Pi 51
Linux Files and the File System 52
Root User Versus sudo 53
Commands 54
Exercise: Navigating in the Linux File System 60
Shells in Linux 63
Package Managers 64
Text Editors 66
Vim Versus emacs Versus nano 67
Using Vim 68
Using emacs 70
Using nano 72
Default Text Editor 73
Summary 74
Chapter 3: Introducing Python 75
Scripting Versus a Programming Language 76
The Python Philosophy 79
Getting Started with Python 81
Running Python Using IDLE 81
Running Python Using the Terminal 87
Running Python Using Scripts 87
Exploring Python Data Types 89
Numbers 90
Strings 91
Lists 93
Dictionaries 96
Tuples and Files 97
Programming with Python 99
IF tests 100
Loops 103
Functions 106
Objects and Object-Oriented Programming 108
Summary 109
Chapter 4: Electronics at 100 MPH 110
Basic Electricity Concepts 112
Required Tools for Robotics 115
Screwdrivers 115
Pliers and Wire Strippers 115
Wire Cutters 118
Files 119
Magnifying Light 120
Hot-Glue Gun 120
Assorted Glues 121
Multimeter 121
Power Supplies 123
Breadboard 124
Power Strip 126
Soldering Iron 127
General Safety Rules 128
Working with Heat 129
Working with Sharp Objects 129
Wear Safety Glasses 130
Fire Extinguishers at the Ready 130
Keep a First-Aid Kit Handy 131
Work in a Ventilated Area 131
Organizing Your Workplace 132
Bonus: Soldering Techniques 134
Summary 137
Chapter 5: The Web Bot 138
Bot Etiquette 140
The Connections of the Web 142
Web Communications Protocols 142
Web Page Formats 143
A Request Example 144
Our Web Bot Concept 145
Parsing Web Pages 145
Coding with Python Modules 148
Using the Mechanize Module 149
Parsing with Beautiful Soup 150
Downloading with the urllib Library 150
Deciding What to Download 151
Choosing a Starting Point 152
Storing Your Files 152
Writing the Python Bot 154
Reading a String and Extracting All the Links 154
Looking For and Downloading Files 155
Testing the Bot 157
Creating Directories and Instantiating a List 158
The Final Code 161
Summary 164
Chapter 6: The Weather Station 165
A Shopping List of Parts 167
Using the I2C Protocol 168
Using an Anemometer 169
Building the Anemometer 170
Connecting the Anemometer to the Pi 176
Correlating Revolutions per Second with Wind Speed 177
Connecting the Digital Compass 180
Connecting the Temperature/Humidity Sensor 184
Connecting the Barometer 186
Connecting the Bits 189
The Final Code 193
Summary 196
Chapter 7: The Media Server 197
A Shopping List of Parts 198
Using an NTFS Drive 198
Installing Samba 202
Configuring Samba 204
Setting Linux Permissions 206
Restarting the Samba Service 207
Connecting with Linux/OS X 209
Kodi and Plex 211
Where’s Python? 214
Summary 215
Chapter 8: The Home Security System 216
Dogs as Security 217
The Raspberry Pi as Security 218
Using a Sensor Network 219
Understanding a Pulldown Resistor 220
A Shopping List of Parts 221
Connecting to Your Network Wirelessly 222
Accessing the GPIO Pins 226
Setting Up the Motion Sensor 228
Setting Up the Reed Switch 231
Setting Up the Pressure Switch 233
Connecting the Magnetic Sensor 234
Setting Up the Pi’s Camera 236
Sending a Text Message from the Pi 237
Implementing the Callback 238
Connecting All of the Bits 239
The Final Code 240
Summary 243
Chapter 9: The Cat Toy 244
A Shopping List of Parts 245
The Concept Behind the Toy 246
Creating and Using Random Numbers 247
Using the GPIO Library 250
Controlling the Servo 252
Constructing the Servo Mechanism 256
Constructing the Laser Mechanism 258
Connecting the Laser to the Servo 260
Connecting the Motion Sensor 262
Connecting All the Bits 265
Final Code 269
Summary 271
Chapter 10: The Radio-Controlled Airplane 272
A Shopping List of Parts 273
Connecting the GPS Receiver to the Pi 275
Setting Up a Log File 278
Formatting a KML File 280
Using Threading and Objects 282
Setting Up Automatic Startup 285
Connecting the Bits 287
The Final Code 292
The Plane Program 292
KML Conversion Program 294
Summary 295
Chapter 11: The Weather Balloon 296
A Shopping List of Parts 297
Setting Up the GPS Receiver 298
Storing the GPS Data 301
Installing PiFM 303
Installing Festival 303
Installing FFMPEG 305
Substituting avconv 306
Preparing the Pi 306
Using Threading and Objects 307
Connecting the Bits 309
Reviewing the Photo Results 314
The Final Code 317
Summary 319
Chapter 12: The Submersible 320
A Shopping List of Parts 322
Accessing the Raspberry Pi’s GPIO Pins 323
Installing the Pi Camera Board 327
Controlling the Sub 329
Attaching the Wiichuck Adapter 331
Activating the Pi’s I2C 332
Reading from the Nunchuk 334
The Nunchuk and LED Test Side Project 336
Controlling the Sub Motors and Camera with the Nunchuk 341
Starting the Program Remotely 344
The Final Code 346
Constructing the Sub 349
Building the Frame 350
Creating the Pi’s Enclosure 351
Waterproofing the Motor Enclosures 351
Connecting the Nunchuk 355
Assembling the Final Product 356
Summary 364
Chapter 13: The Raspberry Pi and the Arduino 365
Exploring the Arduino 366
Installing the Arduino IDE on the Pi 369
Running a Servo 378
Summary 380
Index 381

Erscheint lt. Verlag 19.7.2018
Zusatzinfo XXIV, 373 p. 127 illus.
Verlagsort Berkeley
Sprache englisch
Themenwelt Mathematik / Informatik Informatik Programmiersprachen / -werkzeuge
Informatik Weitere Themen Hardware
Schlagworte Development • Micro computer • programming • Python • Raspberry Pi
ISBN-10 1-4842-3769-2 / 1484237692
ISBN-13 978-1-4842-3769-4 / 9781484237694
Haben Sie eine Frage zum Produkt?
PDFPDF (Wasserzeichen)
Größe: 9,3 MB

DRM: Digitales Wasserzeichen
Dieses eBook enthält ein digitales Wasser­zeichen und ist damit für Sie persona­lisiert. Bei einer missbräuch­lichen Weiter­gabe des eBooks an Dritte ist eine Rück­ver­folgung an die Quelle möglich.

Dateiformat: PDF (Portable Document Format)
Mit einem festen Seiten­layout eignet sich die PDF besonders für Fach­bücher mit Spalten, Tabellen und Abbild­ungen. Eine PDF kann auf fast allen Geräten ange­zeigt werden, ist aber für kleine Displays (Smart­phone, eReader) nur einge­schränkt geeignet.

Systemvoraussetzungen:
PC/Mac: Mit einem PC oder Mac können Sie dieses eBook lesen. Sie benötigen dafür einen PDF-Viewer - z.B. den Adobe Reader oder Adobe Digital Editions.
eReader: Dieses eBook kann mit (fast) allen eBook-Readern gelesen werden. Mit dem amazon-Kindle ist es aber nicht kompatibel.
Smartphone/Tablet: Egal ob Apple oder Android, dieses eBook können Sie lesen. Sie benötigen dafür einen PDF-Viewer - z.B. die kostenlose Adobe Digital Editions-App.

Zusätzliches Feature: Online Lesen
Dieses eBook können Sie zusätzlich zum Download auch online im Webbrowser lesen.

Buying eBooks from abroad
For tax law reasons we can sell eBooks just within Germany and Switzerland. Regrettably we cannot fulfill eBook-orders from other countries.

Mehr entdecken
aus dem Bereich