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

Using a virtual serial adapter on USB OTG


Some of the coolest hacks that are available on the Raspberry Pi Zero are to do with getting it to work with other computers using a single USB cable. In this recipe, we will create a "virtual" serial adapter, so instead of connecting with a specialized USB-to-serial adapter/cable, we can create the same connection using a standard regular-to-micro USB cable. I can carry around the Pi Zero and a cable in my backpack, and any time I need a Linux terminal, I just need a machine with a keyboard and a screen to plug into.

Getting ready

All you need to do to be set up here is perform the USB OTG previous functions recipe. After making the change, you can connect your Pi to any computer from the micro-USB connection. For most desktops, you won't even need additional power to run the Pi; it will all work over the one connection.

How to do it...

This is the most finicky file you will have to edit. Be very careful not to make any mistakes, as it will probably...