Raspberry Pi Zero – Turning The Pi Into A USB Gadget, Over USB

Raspberry Pi Zero – Programming Over USB

[gbaman] has figured out a simpler way to program the new Raspberry Pi Zero over USB without modifying the board. Why is this useful? One example which appealed to us was setting the Zero’s USB port up as a mass storage device. Imagine plugging in your Pi powered robot, dragging and dropping a Python script into the mass storage device that shows up, and pressing a button on the robot to run the new script. Pretty fancy for $5.00.

You can get the PI to emulate a whole range of devices from a USB MIDI controller to a simple USB serial interface. We’re excited to see what uses people come up with. Unfortunately the Pi Zero is still out of stock most everywhere as we wait for the next production run to finish. Though if you’ve got one, why not check out a few of our thoughts and experiences with the device!

[gbaman] based his work off the work done by [Dave-0] and others over at the Raspberry Pi forums. [LadyAda] also has a version of this hack, which we covered, that involves soldering a header to the pi and using a UART adapter.

[via Hacker News]

18 thoughts on “Raspberry Pi Zero – Turning The Pi Into A USB Gadget, Over USB

  1. Custom USB Storage Device with additional WIFI to add easy WebDAV access on every computer you have to work on + little LiPo to give enough juice to power down safely would be IMHO to perfect accessory for work.

      1. Well, a starting point would be to try to understand the issue, before fixing it. The fs is fine, it’s the nature of flash drives which requires care. But rather then fixing those, if you want to use the Pi as a embedded system (i.e. without diaglogue with the user to please properly shut down before cutting power) you’d better off using a Linux distribution meant for such applications, e.g. something based on OpenWRT, which operate out of a RAM disk. Or if it needs to be Debian based then try the flashhybrid package.

  2. It should be also possible to make this work on model A and A+, it’s not only for Zero. Besides, it’s not that bad with Zero availability if you follow main resellers on Twitter.

    1. i don’t think the availability is the point the point is i don’t need a bundle for 15$ and more… just two pi zero for the announced price and thats not possible in the moment.

  3. I need to get one of these and try this. YEARS ago I started trying to turn a NSLU2 “Slug” into a USB OTG Gadget. My ultimate goal was something I could select a disk image, plug in, and boot another PC with the disk image I selected. I wanted a library of bootable disks without lugging around a CD binder. I can’t imagine now…a 64GB SD card full of images, a LCD with buttons and a simple program to select an img and mount it as file backed USB Gadget storage….

  4. Neat. I wonder if it would be possible (with new firmware) to have the pi zero become a usb micro SDcard reader if no bootable OS is found. Maybe even allow for a serial tty link. That way you could flash without a card reader.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.