On Christmas Eve, I received a present from the UPS truck, my order of a Raspberry Pi Zero. I’ve been awaiting for this $5 Pi to see if I could use it in a classroom setting to teach electronics circuit building with Scratch at a low cost.
He was the plan, create a headless Zero (no mouse keyboard or monitor) that could be remoted into and remotely controlled by free VNC software.
Here’s what happened. I connected the Zero to a usb hub for the keyboard, mouse and wireless dongle (you’ll need a micro-usb to USB female adapter for this) and a HDMI monitor (you’ll need a mini-HDMI to HDMI adaptor). I slipped in an microSD card I had around for a Raspberry Pi 2 and plugged in the power! Nothing!!!! No lights, so signs of life whatsoever. Ugh! Was it DOA? Was this my lump of coal?
I Google searched and found others who were getting DOA Zeros. 😦
But then I found an entry that stated that the Zero needed to current Pi OS version Jessie to run. I had but in a Wheezy OS card. I reformatted it to Jessie, plugged it in and YES, it worked!! Weird!
So to download and install Raspbian Jessie OS, here are the instructions.
Next you’ll want to install the VNC remote access software. In a terminal window, type the following:
sudo apt-get install tightvncserver
Next you’ll want to have the VNC server software run on startup. Adafruit has clear instructions for this.
Lastly, you want to give your Pi Zero a static IP address, so you always know where it lives to VNC into it. There are two thoughts here, one is to configure the Pi with a static IP, the other is to configure your router or DHCP server to give it a static IP address based on the Pi’s MAC address. I went for the former. If you want to go with the later, then right-click on the network icon on the top right of the screen. Add select “Wifi Network Settings”. Select the wifi interface and wifi network you are connected to. Uncheck the “Automatically configure” checkbox and fill in the IP address, subnet mask, gateway, etc.
Testing
Here is a picture of my laptop running VNC and Pi Zero.
I used a fully charged 3000mAh battery to power the Zero. On my laptop running VNC, I loaded a webpage displaying the time and ran a Scratch program. The power to the Zero ran out in 3 hours and 45 minutes.
Total Costs
Here is a picture of my setup. If I were use this in a classroom setting, I’d have to add a few more items like a breadboard and GPIO pins. So the costs would be about:
Parts Breakdown to run a class
Raspberry Pi Zero $5.00
Micro-USB to USB Adapter $2.50
3000mAh Battery $10.00
USB Wifi Adapter $9.00
Not shown:
2×20 Female Socket $1.50
Pi-T Cobbler $7.00
Full Size Breadboard $5.00
Total: $35