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. ...

Get Raspberry Pi Zero Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.