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

Making your RPZ a USB mass storage device


This last hack makes it possible to use your Raspberry Pi Zero as a mass storage device. While at first it doesn't seem like much more than turning it into a flash drive, depending on what you are doing, and what else you are doing with your Raspberry Pi Zero, you can make your Raspberry Pi Zero be recognized as a USB flash drive to other computers.

Getting ready

Since we will be using the USB connection for a mass storage device, we should connect to the Raspberry Pi Zero using the USB-to-serial adapter and the GPIO pins, as shown in the first recipe of this chapter. You can make your modifications here, connect your USB and Raspberry Pi together, reboot, and work with the Pi as a flash drive or as the little computer you're used to.

How to do it...

  1. We're going to add one piece after rootwait to make the Pi enabled for USB mass storage. You've seen this in the previous recipes:

            pi@rpz14101:~$ sudo cat /boot/cmdline.txt
            dwc_otg.lpm_enable...