First, prep the Raspberry Pi Zero so that you can attach the Joy Bonnet to it. You'll do this by attaching male headers to the Raspberry Pi Zero's GPIO pins. You have a couple of options here: you can solder on a standard 2x20-pin strip dual male header, or you can use the provided GPIO Hammer Header and jig.
To solder on the the standard pins, follow this guide.
If you don't want to solder on the headers, here's a great alternative!: Hammer Headers.
Hammer headers are special friction fit headers that include a little jig to hold everything in place, while you smash away at it with a hammer! OK, you may want to be a bit gentle with it, but not too gentle. You know, "hammer gentle".
Once you've be-headered your Pi Zero, go ahead and fit it into its case. Then, align the Joy Bonnet's female headers over the Pi Zero's male headers and squeeze them together snugly.
The Pi Zero can't do much without an operating system, so let's give it one. Insert the 8GB NOOBS (New Out of Box Software) micro-SD card into the Pi Zero's micro-SD card slot. NOOBS is an interface that makes it easy to install your operating system, in this case we'll install Raspbian Linux, once we get everything else plugged in.
Plug the micro-HDMI to HDMI cable into the Pi Zero on one end, and your TV or monitor on the other.
While you won't need a keyboard and mouse connected when once your Pi Zero is configured as an image player for your haunted portrait, you'll need to connect those now on order to configure things.
You can use a wireless keyboard/mouse combo, such as this one, or use wired input devices via a hub plugged into the Pi Zero using the OTG host cable. That particular hub is a great choice, because it allows you to plug in multiple USB devices as well as an Ethernet cable, which we'll need for some additional software installation later.
Note that the Pi Zero's data micro-USB port is the one near the center of the board, marked "USB", and this is the one into which your OTG cable must be plugged. The other micro-USB port, marked "PWR", is for power only.
You can now power up the Pi. Make sure the TV is turned on, then plug the power supply into the wall, and the other end into the Pi's PWR micro-USB port. The green power indicator LED on the Pi Zero will light up, and then you'll see signs of life on the TV.
After your Pi Zero boots up, and you will use the NOOBS interface to install Raspbian.
You'll want to choose the language and keyboard from the dropdown menus at the bottom (for example, English (US) and US), then check the Raspbian OS checkbox, then click "Install".
This is a great resource for more information on NOOBS and Raspbian installation. (Skip ahead to the section called "First Boot"), here are some highlights:
- Plug in your keyboard, mouse, and monitor cables.
- Now plug the USB power cable into your Pi.
- Your Raspberry Pi will boot, and a window will appear with a list of different operating systems that you can install. We recommend that you use Raspbian – tick the box next to Raspbian and click on
- Raspbian will then run through its installation process. Note that this can take a while.
- When the install process has completed, the Raspberry Pi configuration menu (raspi-config) will load. Here you are able to set the time and date for your region, enable a Raspberry Pi camera board, or even create users. You can exit this menu by using Tab on your keyboard to move to
The default login for Raspbian is username
pi with the password
raspberry. Note that you will not see any writing appear when you type the password. This is a security feature in Linux.
To load the graphical user interface, type
startx and press Enter.
Congratulations, you've installed your operating system!
In case you didn't choose this during setup (I occasionally forget), now's a good time to adjust the internationalization of your system and keyboard to match your region. Here's a great guide on adjusting internationalization and keyboard layout, as well as some other useful configs.
One nice feature of Linux is the ability to easily install software from online repositories by using simple commands. To access these, plug in an Ethernet cable from your local network router to the OTG hub on the Pi Zero. Alternately, you can use a USB WiFi dongle to get online. Here's a guide on setting up WiFi on the Pi.
Update Application List
Once online, you can update the "apt-get" software. This will update the list of available software. To do so, you'll open a command line window by clicking the "Terminal" icon at the top of the screen.
Then, on the Terminal window's command line, type
sudo apt-get update
And then press return. This will run for a little bit as it reads the available package lists, and then finish, reporting that it is done.
Now you'll be able to install software in later steps, including the image player, called feh, and know that you're getting the latest version.
Next, we'll set up the Pi Zero for image playback. This guide on building a Pi-based digital picture frame is an excellent resource, which I followed closely while building my Haunted Portrait.
I'll cover all of the crucial steps here, but you can head to the link for other details, such as setting up SSH, which we won't be doing here.
Keep the Screen On
First thing to do is prevent the screen from turning "off" (actually just going black) after your Pi Zero has been idle for too long. This is normally a good thing, but not when you're making a Haunted Portrait! You can do this by editing the lightdm.conf file. In the Terminal, type:
sudo nano /etc/lightdm/lightdm.conf
This opens the lightdm.conf file in a text editor called nano.
Once this opens in nano, use the arrow keys (or mouse wheel for faster scrolling) to navigate down to the line that reads:
Add a new line below that one, and type this in:
xserver-command=X -s 0 -dpms
That line tells the screen to never "blank" or darken.
To save and exit from nano type ctrl+x on the keyboard, which will lead to the question to save the file (modified buffer) or not, to which you'll reply yes by typing a Y for "yes". Then press return to accept the existing file name, overwriting the old version.
This file's parameters are read at system startup, so in order to invoke them, you must now restart the Pi Zero by typing:
in the Terminal window and then pressing return.
Once your Pi Zero reboots, we can move on to installing the image player software.
Now, let's install the image player!