Raspberry Pi for Python Programmers Cookbook - Second Edition
eBook - ePub

Raspberry Pi for Python Programmers Cookbook - Second Edition

Tim Cox

Buch teilen
  1. 510 Seiten
  2. English
  3. ePUB (handyfreundlich)
  4. Über iOS und Android verfügbar
eBook - ePub

Raspberry Pi for Python Programmers Cookbook - Second Edition

Tim Cox

Angaben zum Buch
Buchvorschau
Inhaltsverzeichnis
Quellenangaben

Über dieses Buch

Over 60 recipes that harness the power of the Raspberry Pi together with Python programming and create enthralling and captivating projectsAbout This Book• Install your first operating system, share files over the network, and run programs remotely• Construct robots and interface with your own circuits and purpose built add-ons, as well as adapt off-the-shelf household devices using this pragmatic guide• Packed with clear, step-by-step recipes to walk you through the capabilities of Raspberry Pi Who This Book Is ForReaders are expected to be familiar with programming concepts and Python (where possible Python 3 is used), although beginners should manage with the help of a good Python reference book and background reading. No prior knowledge of the Raspberry Pi or electronics is required; however, for the hardware sections you will need some basic electronic components/household tools to build some of the projects.What You Will Learn• Get the Raspberry Pi set up and running for the first time• Remotely connect to the Raspberry Pi and use your PC/laptop instead of a separate screen/keyboard• Get to grips with text, files and creating quick menus using Python• Develop desktop applications; handle images and process files with ease• Make use of graphics and user control to develop your own exciting games• Use the Raspberry Pi's powerful GPU to create 3D worlds• Take control of the real world and interface with physical hardware, combining hardware and software for your own needs• Measure and control processes, respond to real events and monitor through the Internet• Learn about the Raspberry Pi hardware inputs/outputs, starting with the basics and beyond• Expand the capabilities of the Raspberry Pi with hardware expansion / add-on modules (use analogue inputs, drive servos and motors, and use SPI/I2C)• Create your own Pi-Rover or Pi-Hexpod driven by the Raspberry Pi• Make use of existing hardware by modifying and interfacing with it using the Raspberry PiIn DetailRaspberry Pi cookbook for Python Programmers is a practical guide for getting the most out of this little computer. This book begins by guiding you through setting up the Raspberry Pi, performing tasks using Python 3 and introduces the first steps to interface with electronics. As you work through each chapter you will build up your skills and knowledge and apply them as you progress throughout the book, delving further and further into the unique abilities and features of the Raspberry Pi.Later, you will learn how to automate tasks by accessing files, build applications using the popular Tkinter library and create games by controlling graphics on screen. You will harness the power of the built-in graphics processor by using Pi3D to generate your own high quality 3D graphics and environments. Connect directly to the Raspberry Pi's hardware pins to control electronics from switching on LEDs and responding to push buttons right through to driving motors and servos. Learn how to monitor sensors to gather real life data and to use it to control other devices, and view the results over the Internet. Apply what you have learnt by creating your own Pi-Rover or Pi-Hexipod robots. Finally, we will explore using many of the purpose built add-ons available for the Raspberry Pi, as well as interfacing with common household devices in new ways.Style and approachWritten in a cookbook style, the book contains a series of recipes on various topics, ranging from simple to complex. It is an easy-to-follow and step-by-step guide with examples of various feature integration suitable for any search application.

Häufig gestellte Fragen

Wie kann ich mein Abo kündigen?
Gehe einfach zum Kontobereich in den Einstellungen und klicke auf „Abo kündigen“ – ganz einfach. Nachdem du gekündigt hast, bleibt deine Mitgliedschaft für den verbleibenden Abozeitraum, den du bereits bezahlt hast, aktiv. Mehr Informationen hier.
(Wie) Kann ich Bücher herunterladen?
Derzeit stehen all unsere auf Mobilgeräte reagierenden ePub-Bücher zum Download über die App zur Verfügung. Die meisten unserer PDFs stehen ebenfalls zum Download bereit; wir arbeiten daran, auch die übrigen PDFs zum Download anzubieten, bei denen dies aktuell noch nicht möglich ist. Weitere Informationen hier.
Welcher Unterschied besteht bei den Preisen zwischen den Aboplänen?
Mit beiden Aboplänen erhältst du vollen Zugang zur Bibliothek und allen Funktionen von Perlego. Die einzigen Unterschiede bestehen im Preis und dem Abozeitraum: Mit dem Jahresabo sparst du auf 12 Monate gerechnet im Vergleich zum Monatsabo rund 30 %.
Was ist Perlego?
Wir sind ein Online-Abodienst für Lehrbücher, bei dem du für weniger als den Preis eines einzelnen Buches pro Monat Zugang zu einer ganzen Online-Bibliothek erhältst. Mit über 1 Million Büchern zu über 1.000 verschiedenen Themen haben wir bestimmt alles, was du brauchst! Weitere Informationen hier.
Unterstützt Perlego Text-zu-Sprache?
Achte auf das Symbol zum Vorlesen in deinem nächsten Buch, um zu sehen, ob du es dir auch anhören kannst. Bei diesem Tool wird dir Text laut vorgelesen, wobei der Text beim Vorlesen auch grafisch hervorgehoben wird. Du kannst das Vorlesen jederzeit anhalten, beschleunigen und verlangsamen. Weitere Informationen hier.
Ist Raspberry Pi for Python Programmers Cookbook - Second Edition als Online-PDF/ePub verfügbar?
Ja, du hast Zugang zu Raspberry Pi for Python Programmers Cookbook - Second Edition von Tim Cox im PDF- und/oder ePub-Format sowie zu anderen beliebten Büchern aus Computer Science & Programming in Python. Aus unserem Katalog stehen dir über 1 Million Bücher zur Verfügung.

Information

Jahr
2016
ISBN
9781785283901

Raspberry Pi for Python Programmers Cookbook - Second Edition


Table of Contents

Raspberry Pi for Python Programmers Cookbook - Second Edition
Credits
About the Author
About the Reviewer
www.PacktPub.com
eBooks, discount offers, and more
Why Subscribe?
Preface
What this book covers
What you need for this book
Who this book is for
Safety and using electronics
Sections
Getting ready
How to do it…
How it works…
There's more…
See also
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Getting Started with a Raspberry Pi Computer
Introduction
Introducing the Raspberry Pi
What is with the name?
Why Python?
Python 2 and Python 3
Which version of Python should you use?
The Raspberry Pi family – a brief history of Pi
Which Pi to choose?
Connecting the Raspberry Pi
Getting ready
How to do it…
There's more…
Secondary hardware connections
Using NOOBS to set up your Raspberry Pi SD card
Getting ready
How to do it…
How it works…
There's more…
Changing the default user password
Ensuring that you shut down safely
Preparing an SD card manually
Expanding the system to fit in your SD card
Accessing the RECOVERY/BOOT partition
Using the tools to back up your SD card in case of failure
Networking and connecting your Raspberry Pi to the Internet via the LAN connector
Getting ready
How to do it…
There's more…
Using built-in Wi-Fi and Bluetooth on the Raspberry Pi
Getting ready
How to do it…
Connecting to your Wi-Fi network
Connecting to Bluetooth devices
Configuring your network manually
Getting ready
How to do it…
There's more…
Networking directly to a laptop or computer
Getting ready
How to do it…
How it works…
There's more…
Direct network link
See also
Networking and connecting your Raspberry Pi to the Internet via a USB Wi-Fi dongle
Getting ready
How to do it…
There's more…
Using USB wired network adapters
Connecting to the Internet through a proxy server
Getting ready
How to do it…
How it works…
There's more…
Connecting remotely to the Raspberry Pi over the network using VNC
Getting ready
How to do it…
There's more…
Connecting remotely to the Raspberry Pi over the network using SSH (and X11 Forwarding)
Getting ready
How to do it…
How it works…
There's more…
Running multiple programs with X11 Forwarding
Running as a desktop with X11 Forwarding
Running PyGame and Tkinter with X11 Forwarding
Sharing the home folder of the Raspberry Pi with SMB
Getting ready
How to do it…
Keeping the Raspberry Pi up to date
Getting ready
How to do it…
There's more…
2. Starting with Python Strings, Files, and Menus
Introduction
Working with text and strings
Getting ready
How to do it…
How it works…
There's more…
Using files and handling errors
Getting ready
How to do it…
How it works…
Creating a boot-up menu
How to do it…
How it works…
There's more…
Creating a self-defining menu
How to do it…
How it works…
There's more…
Alternative script locations
Adding scripts to PATH
3. Using Python for Automation and Productivity
Introduction
Using Tkinter to create graphical user interfaces
Getting ready
How to do it…
How it works…
Creating a graphical application – Start menu
Getting ready
How to do it…
How it works…
There's more…
Displaying photo information in an application
Getting ready
How to do it…
How it works…
There's more…
Organizing your photos automatically
Getting ready
How to do it…
How it works…
4. Creating Games and Graphics
Introduction
Using IDLE3 to debug your programs
How to do it…
How it works…
Drawing lines using a mouse on Tkinter Canvas
Getting ready
How to do it…
How it works…
Creating a bat and ball game
Getting ready
How to do it…
How it works…
Creating an overhead scrolling game
Getting ready
How to do it…
How it works…
5. Creating 3D Graphics
Introduction
Starting with 3D coordinates and vertices
Getting ready
How to do it…
How it works…
There's more…
Camera
Shaders
Lights
Textures
Creating and importing 3D models
Getting ready
How to do it…
How it works...
There's more…
Creating or loading your own objects
Changing the object's textures and .mtl files
Taking screenshots
Creating a 3D world to roam in
Getting ready
How to do it…
How it works…
Building 3D maps and mazes
Getting ready
How to do it…
How it works...
There's more...
The Building module
Using SolidObjects to detect collisions
6. Using Python to Drive Hardware
Introduction
Controlling an LED
Getting ready
How to do it…
How it works…
There's more…
Controlling the GPIO current
Responding to a button
Getting ready
How to do it…
How it works…
There's more…
Safe voltages
Pull-up and pull-down resistor circuits
Protection resistors
A controlled shutdown button
Getting ready
How to do it…
How it works…
There's more…
Resetting and rebooting Raspberry Pi
Adding extra functions
The GPIO keypad input
Getting ready
How to do it…
How it works…
There's more…
Generating other key combinations
Emulating mouse events
Multiplexed color LEDs
Getting ready
How to do it…
How it works…
There's ...

Inhaltsverzeichnis