Hand tools and fabrication machines
WiFi on the Zero
I found the Hackaday project to add an ESP8266 Wi-Fi to a Raspberry Pi Zero. It seemed like a great cheap way to get Wi-Fi on my raspberry pi zero without using the USB. This becomes a very minimalist IoT base computer or even a minimal server machine.
For the Wifi, you only need to
- Build the 9 connections between the two boards
- Compile the driver
- Install the driver
- Watch it go.
The software configuration for the PI is in the instruction section of the Hackaday project. Get the driver from the Hackaday instructions.
There's a lot more information in the Hackaday project while they were learning in case you run into trouble.
Driver Doesn't Load
I found that mine has to reset the ESP8266 every few reboots in order to get it working. So, I built a script to do that. It runs 30 seconds after machine startup.
I invoke the script from /etc/rc.local:
Here is the script itself:
pi@raspberrypi:/etc $ cat /home/pi/esp_reset #!/bin/sh sleep 30 sudo modprobe -r esp8089 echo 0 >/sys/class/gpio/export sleep 1 echo low >/sys/class/gpio/gpio0/direction sleep 1 echo in >/sys/class/gpio/gpio0/direction sleep 1 sudo modprobe -r esp8089
Then I found that 30 seconds was a long time and sometimes it didn't load. I initially wired up a monitor to the PI but eventually realized that was pretty cumbersome to set it up. I dug around in the spare hardware I had and found a board that could also function as a console adapter for the Pi. It's written up here:
I've always liked how my Mac is able to do its Time Machine backups.. In Windows 10 I can use "File History" to do basically the same thing.
The Zero with Wifi above forms the base server. I found instructions here for installing Samba and setting up a file server:
Then I plugged in a 500Gb Sata drive to a USB/SATA interface through the USB port on the zero.
Here's what it looks like:
Now all that is needed is to find a dark corner to stick the Server and let it do its job silently.
After placing in the server closet it's been running for several days now 24x7 without any issues.
- Stand up Rsync on the PI so I can optionally backup Linux boxes.
- Stand up SSH with a key on the windows laptop so I can backup an SD card automatically. (File history doesn't like the external SD for some reason.)
- Install VPN software so I can backup from anywhere.