Nav

Setting up your Pi Cap on the Raspberry Pi Zero

Follow this tutorial to set up your Pi Cap with a Raspberry Pi Zero.

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. If you are have a Raspberry Pi 1 A+/B+, Raspberry Pi 2 or Raspberry Pi 3, you should check out our alternative instructions here.

Use this guide to decide which Raspberry Pi to use, or to check if yours is compatible with the Pi Cap.

Pi Cap + Raspberry Pi Visual Guide

Use the grapher to visualise the sensitivity and precision of the Pi Cap’s sensors.

Pi Cap + Grapher

Follow this tutorial to set up your Pi Cap with a Raspberry Pi 1 A+/B+, Raspberry Pi 2 or Raspberry Pi 3.

Setting up your Pi Cap on the Raspberry Pi 1, 2 or 3

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 1

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

Update 30 October: The mosquitto library is not included in the latest Raspbian version, causing an error when trying to install the Pi Cap package. We’re working on this, but in the meantime, you can use an older version of Raspbian, which you can download here.

Links

Step 2

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 3.

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 13.

Links

Step 3

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.

 

Links
header soldered to pi zero

Step 4

microSD card

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

 

Links

Step 5

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!

Links

Step 6

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 in to the USB port labelled USB, not the one labelled PWR IN on the Pi Zero.

Links

Step 7

Keyboard & mouse

Connect a USB keyboard and mouse to the USB hub.

Links

Step 8

Screen

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

Links

Step 9

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.

Links

Step 10

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.

Links

Step 11

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

 

Links

Step 12

Terminal

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

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

Links

Step 13

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.

Links
header soldered to pi zero

Step 14

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

 

Links
highlighted ssh file

Step 15

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!

Links

Step 16

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.

Links

Step 17

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

Links

Step 18

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.

 

Links

Step 19

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!

Links

Step 20

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.

Links

Step 21

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.

Update 25 September: The mosquitto library is not included in the latest Raspbian version, causing an error when trying to install the Pi Cap package. We’re working on this, but in the meantime, you can use the following commands instead:

1. apt-get download picap
2. sudo apt-get install wiringpi libsdl2-mixer-dev python-liblo python-pygame liblo-dev libav-tools espeak
3. sudo dpkg -i –ignore-depends=python-mosquitto –ignore-depends=libmosquitto-dev picap_1.3.0_armhf.deb
4. Proceed to the next step

Links

Step 22

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.

Links

Step 23

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!

Links
Pi Cap intro image

Suggested Tutorials

Use this guide to decide which Raspberry Pi to use, or to check if yours is compatible with the Pi Cap.

Pi Cap + Raspberry Pi Visual Guide

Use the grapher to visualise the sensitivity and precision of the Pi Cap’s sensors.

Pi Cap + Grapher

Follow this tutorial to set up your Pi Cap with a Raspberry Pi 1 A+/B+, Raspberry Pi 2 or Raspberry Pi 3.

Setting up your Pi Cap on the Raspberry Pi 1, 2 or 3

Categories

Bare Conductive

Instructions

Pi Cap

Date Posted

2016/07/24

Rating

0.00 avg. rating (0% score) - 0 votes