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

Integrating voltage translators with the RPZ


With many peripherals understanding a 5V digital input and the Raspberry Pi Zero operating at 3.3V, you might require a voltage shift from the output of the Raspberry Pi GPIO to an external device. While there are a few ways to accomplish this, the use of a voltage translator will ensure the fastest and most error-free communication. While a voltage divider works great most of the time, the slew rate can cause dirty signal reads, and voltage dividers can only be used for inputs. By having a voltage translator in our toolkit, we expand our ability for the Raspberry Pi Zero to communicate with anything that uses 3.3V or 5V inputs or outputs.

Getting ready

For this recipe, I used a breakout board from Adafruit, the 4-channel I2C-safe Bi-directional Logic Level Converter (https://www.adafruit.com/products/757). There are other logic translators available, but this one will work with 5V I2C devices, which are commonly used with microcontrollers such...