One of the very cool features of the Pi Zero is it's ability to tether itself directly to another computer through USB, enabling it to share network resources.
In this video I'm going to show you how to set this up, and how a simple, and cheap hardware modification can turn this $5 Pi into an even more useful USB dongle computer.
Step 1. Go to raspberrypi.org and download the latest Raspbian image. You then need to format and write it to a micro sd card. There are lots of tutorials online for this, so no need to go over it again.
Step 2. Plug the micro sd card into your computer and navigate to the root directory of the drive. We're looking for two files, config.txt and cmdline.txt
Step 3. Open config.txt in a text editor. I'm using nano but, you can use whatever. Scroll all the way to the bottom and add the following text to the file.dtoverlay=dwc2
Save that and close the file.
Step 4. Now open up the cmdline.txt file. Look for the word rootwait, and after it type the following:modules-load=dwc2,g_ether
Save the file and close it.
Step 5. Now we need to perform the hardware modification. As you can see from the bottom of the Pi, we simply solder a USB male plug to both the USB data testpads and the 5v and ground GPIO pins.
Make sure you add some tape to the bottom of the zero to insulate from the USB plugs metal shielding.
Then just cut a piece of scrap plastic, add holes and use nuts and bolts secure it in place.
Step 6. Insert the micro sd card in the Pi Zero and plug it into your computer. The green light will come on, and it will start booting.
Step 7. Test that everything is working, by SSH'ing into the Pi. For this, we'll need to use raspberrypi.local as the local address to connect to:ssh email@example.com
If this doesn't work right away, you may need to install NDIS drivers on your computer, and check your network settings. I've included some links below:
Windows Guide: https://www.youtube.com/watch?v=aL1pWI2K60w
Mac OS X Drivers: https://github.com/jwise/horndis
Besides simply SSH'ing into the Pi, you could also easily install a remote desktop client and use the GUI. You can share your computers internet connection with the Pi, and use it just like you would normally, but now without the need for a monitor, chargers, adapters, cables or peripherals.
The nice thing about this design is that it stays almost within the same small footprint as the zero. The GPIO pins are still accessible, and it's very easy to swap out the micro sd cards.
This portability means you can still use it like a regular Pi if you need to, though I don't suggest you use the dongle and micro USB ports at the same time.