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

Raspberry Pi for Python Programmers Cookbook - Second Edition

Tim Cox

Compartir libro
  1. 510 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y Android
eBook - ePub

Raspberry Pi for Python Programmers Cookbook - Second Edition

Tim Cox

Detalles del libro
Vista previa del libro
Índice
Citas

Información del libro

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.

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es Raspberry Pi for Python Programmers Cookbook - Second Edition un PDF/ePUB en línea?
Sí, puedes acceder a Raspberry Pi for Python Programmers Cookbook - Second Edition de Tim Cox en formato PDF o ePUB, así como a otros libros populares de Computer Science y Programming in Python. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
2016
ISBN
9781785283901
Edición
2

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 ...

Índice