Book Image

Raspberry Pi Zero Cookbook

Book Image

Raspberry Pi Zero Cookbook

Overview of this book

The Raspberry Pi Zero, one of the most inexpensive, fully-functional computers available, is a powerful and revolutionary product developed by the Raspberry Pi Foundation. The Raspberry Pi Zero opens up a new world for the makers out there. This book will give you expertise with the Raspberry Pi Zero, providing all the necessary recipes that will get you up and running. In this book, you will learn how to prepare your own circuits rather than buying the expensive add–ons available in the market. We start by showing you how to set up and manage the Pi Zero and then move on to configuring the hardware, running it with Linux, and programming it with Python scripts. Later, we integrate the Raspberry Pi Zero with sensors, motors, and other hardware. You will also get hands-on with interesting projects in media centers, IoT, and more.
Table of Contents (17 chapters)
Raspberry Pi Zero Cookbook
Credits
About the Author
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface

Interfacing the PiFace with the RPZ


The PiFace module is a board for any Raspberry Pi, and it provides eight outputs, two protective relays, eight inputs, and all of the circuitry--you need to use only your SPI channel on your Raspberry Pi. With high-voltage terminals, this is an ideal board for running several motors, lights, and sensors simultaneously.

Getting ready

For this, you'll need the PiFace Digital Revision 2 Board. This is available online through Element 14 (https://www.element14.com/community/docs/DOC-69001) and other resellers. It attaches directly to your Raspberry Pi Zero if the RPZ has a male header; otherwise, you'll need a ribbon cable. You also want a couple of LEDs and 330 Ohm resistors.

Here' what the top of the PiFace Digital 2 looks like:

The top of the PiFace Digital 2

Here's the PiFace and Raspberry Pi Zero footprint:

The PiFace adds a bit to the overall Raspberry Pi Zero footprint

How to do it...

  1. You'll need to have SPI enabled, which is covered in in Chapter 5, Getting...