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:
Here's the PiFace and Raspberry Pi Zero footprint:
How to do it...
You'll need to have SPI enabled, which is covered in in Chapter 5, Getting...