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 RFID tags with the RPZ


Radio frequency identification, or RFID, is a common method of near-field communication. You can teach your Raspberry Pi to understand an RFID board's communication with RFID cards and keyfobs.

Getting ready

There are a few different RFID kits available. I used the Elegoo RC522 included in their kit, which is a fairly typical RFID board. Adafruit also has kits that detect both RFID cards and NFC signals typically used on smartphones, and they always include great instructions. You'll also need a red-and-green LED and a couple of 330-Ohm resistors. Finally, you will need SPI enabled on your Raspberry Pi Zero; if you haven't done that already, refer to Basics of SPI and Setting up the SPI Module in Chapter 5, Getting Your Hands Dirty Using the GPIO Header.

How to do it...

If you completed the previous recipe and have an RTC board connected, you don't have to remove it! The RFID board communicates over SPI, whereas the RTC talks on I2C.

  1. Configure the RFID board...