Introduction: Setting Up Your Pi Cap on the Raspberry Pi Zero

About: Bare Conductive makes creative electronic tools for any designer, engineer or aspiring maker.

Add precise capacitive touch, proximity sensing and high quality audio to your Raspberry Pi project with the Pi Cap.

We have worked hard to make setting up your Pi Cap as straightforward as possible, but the process depends on the model of Raspberry Pi you are using. These instructions are for the Raspberry Pi Zero.

Step 1: ​Materials - to Begin You Will Need

1x Pi Cap

-

1x Raspberry Pi Zero

1x 2.54mm pitch 2x20 pin header

1x microSD card (8 GB or larger recommended) loaded with Raspbian or NOOBS

1x USB micro power supply

1x USB OTG cable

1x ethernet cable and 1x USB-ethernet adapter

-

(optional)

1x Raspberry Pi WiFi adapter

1x powered USB hub

1x USB keyboard

1x USB mouse

1x HDMI display - TV or monitor with an HDMI to mini HDMI cable

Step 2: ​NOOBs or Raspbian

Before you begin, make sure you have a microSD card which is loaded with NOOBs or Raspbian. You can find the instructions for how to set up NOOBs or load Raspbian onto your card by following the links below:

Putting Raspbian or NOOBS on a microSD card

If this is your first time working with Raspberry Pi, you can find more resources to learn about what NOOBs, Raspbian, and Raspberry Pi, here

Step 3: ​Select a Setup Method

The first step is to decide how you want to connect to your Raspberry Pi in order to set it up. If you want to keep a screen connected to the Pi Zero when it is in use, the please proceed to Step 4. Alternatively, if you don’t want to keep a screen connected to your Pi Zero the whole time, you may be better off setting it up via a network connection. In this case, skip to Step 14.

Step 4: ​Setting Up Your Pi Zero With a Screen

First, solder your 2×20 pin header to the Pi Zero with the solder joints made on the flat (non-component) side of the board – take a look at the picture on the right to see how this should look.

Step 5: ​microSD Card

Insert your microSD card loaded with NOOBs or Raspbian into your Pi Zero.

Step 6: Mounting

Mount the Pi Cap onto your Pi Zero so that it looks like the image on the right. Be careful to make sure that all the pins on the Pi line up correctly with the connector on the Pi Cap. Warning – if you get this wrong, you could damage the Pi Cap and your Pi Zero!

Step 7: USB Hub

Connect a powered USB hub (i.e. one with its own power adapter) to the Pi Zero using a USB OTG cable. Be sure to plug it into the USB port labelled USB, not the one labelled PWR IN on the Pi Zero.

Step 8: Keyboard & Mouse

Connect a USB keyboard and mouse to the USB hub.

Step 9: Screen

Connect an HDMI compatible screen (either a monitor or a TV) to the Pi Zero. Turn on the screen.

Step 10: Power Up

Connect the power to the Pi via a micro USB power supply – your Raspberry Pi will boot up. Ensure that this is connected to the USB port labelled PWR IN, not the one labelled USB, which should already have the USB hub connected to it.

Step 11: NOOBs

If you are using NOOBs, you’ll see a list of different options when it loads. Choose Raspbian.

If your card is loaded with Raspbian, your screen should load the Raspberry Pi operating system automatically. If you see the logo in the middle of your screen you’re ready to move to the next step.

Step 12: Set Up an Internet Connection

We recommend doing this by connecting an ethernet cable to a USB-ethernet adapter, and then plugging this into the USB hub (image 1). This will ensure a stable internet connection and can be more reliable than Wifi.

Otherwise, you can opt to use an official WiFi dongle, and connect it to the USB hub (image 2).

Once connected, check that the internet connection is working by opening a browser window. If it’s not, check you’re connected to your local network.

For more troubleshooting information on this, you can check out:

Setting up WiFi on the Pi

About the dongle:

Official Raspberry Pi WiFi Dongle

Step 13: Terminal

You may then continue setup by running terminal on the Pi. Proceed to Step 19 to Update your Pi.

For more information on this, you can check out Getting started with Terminal on the Pi

Step 14: Setting Up Your Pi Zero With a Network Connection

This is the best way to set up your Pi if you are unlikely to keep a screen connected to your Pi Zero once your project is set up.

To begin, solder your 2×20 pin header to the Pi Zero with the solder joints made on the flat (non-component) side of the board – take a look at the picture on the right to see how this should look.

Step 15: MicroSD Card

Next, load Raspbian onto a microSD card. You can find the instructions on how to upload it here . Once you have loaded Raspbian onto the microSD card, you need to add a file named “SSH” onto the /boot/ partition. Simply download this file here , extract it and copy paste the extracted ssh file onto the /boot/ partition. It should show up among the other files as shown on the image on the right. You can then eject the microSD card and insert into your Raspberry Pi.

If this is your first time working with Raspberry Pi, you can find more resources to learn about NOOBs, Raspbian, and Raspberry Pi, here

Step 16: Mounting

Mount the Pi Cap onto your Pi Zero so that it looks like the image on the right. Make sure that all the pins on the Pi line up correctly with the connector on the Pi Cap.

Warning – if you get this wrong, you could damage the Pi Cap and your Pi Zero!

Step 17: Power Up

Connect the power to the Pi via a micro USB power supply – your Raspberry Pi will boot up. Ensure that this is connected to the USB port labelled PWR IN, not the one labelled USB. Give the Pi about a minute to boot before proceeding to the next step.

Step 18: Set Up an Internet Connection

We recommend doing this by connecting an ethernet cable to a USB-ethernet adapter attached via a USB OTG cable to the Pi Zero (image 1-3). This will ensure a stable internet connection. Be sure to connect the USB OTG cable to the USB port labelled USB, not PWR IN.

You can also opt to use an official WiFi dongle, and connect using the terminal, but the connection may be less reliable (image 4). Be sure to connect the USB OTG cable to the USB port labelled USB, not PWR IN.

For more information on this, you can check out:

Setting up WiFi on the Pi

About the dongle:

Official Raspberry Pi WiFi Dongle

Step 19: SSH - Mac and Linux

Now you are connected, you can continue setup by via SSH – this stands for Secure SHell. It is a way of connecting to the terminal of another machine (in the case the Raspberry Pi) from your computer – provided that they are on the same network.

On Mac and Linux, this is as easy as running your terminal and typing “ssh pi@raspberrypi.local” (without the quotes) followed by Enter. There may be a security question regarding an unknown key at this point – you can safely continue, as all this is saying is that it has not connected to the Raspberry Pi before – the message should not appear the next time you connect.

You will then be prompted for a password – by default, this is “raspberry” (again, no quotes). You will now have a prompt that looks just as if you were looking at the terminal on the Raspberry Pi – but it is on your machine. Magic!

If you want to change the default password later on, there are loads of resources on the internet that explain how.

Step 20: SSH - Windows

Now you are connected, you can continue setup by via SSH – this stands for Secure SHell. It is a way of connecting to the terminal of another machine (in the case the Raspberry Pi) from your computer – provided that they are on the same network.

On Windows, you have to run a program called PuTTY (there is no installer, just a .exe file) – there is a link to download this below. When you run it, you will see a configuration screen. Under Host Name enter “pi@raspberrypi.local” (as always, don’t include the quotes) and click Open. Again, you may get a security prompt – you can safely continue and you should not see this prompt again. When asked for the password, enter “raspberry” (this is the last time I am writing no quotes!) and you will be logged in. Phew!

Step 21: Update Your Pi!

So now that you have a terminal prompt, you can start entering commands to run on the Pi. To begin with, you are going to update the list of available packages that the Pi can install – type “sudo apt-get update” into the terminal, followed by Enter. By the way, “sudo” here means “do this command with superuser privileges” – it allows you to access to deeper parts of the Raspbian operating system than you would otherwise be able to. The “apt-get” command is used to interface with available software packages, and “update” speaks for itself. Packages are like apps.

This will take a little while. Once it is done, you should then run “sudo apt-get dist-upgrade” which will ensure that Raspbian itself and all installed packages are up to date too. This will take considerably longer – around 10 minutes, and you might need to answer yes to a couple of questions about disk space. Probably a good time for a cup of tea. Once this is complete, you will need to reboot the pi by entering “sync && sudo reboot” at the terminal.

Step 22: Install the Picap Package

With our Pi now as up-to-date as it can be, it is time to install the actual software package that supports the Pi Cap – conveniently called “picap”. If you were connected via SSH before, you will need to reconnect to the Pi as the reboot will have closed that connection.

At the terminal, type “sudo apt-get install picap” followed by enter. You may be asked to confirm that you are happy to install the picap package and the other packages that it requires – simply answer Y to these questions. Once this is complete, we need to configure the Pi Cap, which we cover in the next step.

Step 23: Configure the Picap Package

To configure the picap package, you need to run “picap-setup” at the terminal.

Firstly we ask whether you want to enable high quality audio on the Pi. We strongly recommend that you do this – it will enable the new, higher-quality audio driver that the Raspberry Pi team have worked hard on, which is a huge improvement on the previous version. Eventually this will be enabled as standard in Raspbian, but for now you have to do it manually.

Next we ask whether or not to install examples into your home folder. We recommend that you do this, but you can of course choose not to. You can install them into any directory you like later using the “install-picap-examples” command.

Once this is complete, we ask whether you would like to reboot the Pi in order to complete installation. If you choose not to do this, you need to perform one final reboot using “sync && sudo reboot” before you can use the Pi Cap.

Step 24: What Next?

Now that you have all of the software installed and your Raspberry Pi is rebooted, you will probably want to do something with it!

Open a terminal (ssh-ing in if necessary), type “picap-intro” and hit Enter. This will take you to an interactive tour of the example code we’ve written, and show you what the Pi Cap is capable of.

Have fun!