# PiGRRL 2

## Overview

https://www.youtube.com/watch?v=xzfvlyLVFtw

![](https://cdn-learn.adafruit.com/assets/assets/000/029/899/medium800/raspberry_pi_hero-pigrrl2-outside.jpg?1453136116)

## Raspberry Pi Retro Game Console

This project takes the original&nbsp;concept of the [PiGRRL](../../../../pigrrl-raspberry-pi-gameboy)&nbsp;and makes it more powerful, using a Raspberry Pi 2. It's about the same size but features more buttons (D-Pad, A,B,X,Y, L, R, pause and start.) and four extra buttons on the PiTFT. It's sporting a small audio amplifier and speaker, so you can enjoy the crispy sounds of 8-bit goodness.&nbsp;

## Easier to build!

With this update, we really wanted to make it easier to build. We've dramatically cut the build time in half by making a custom gamepad PCB. Just&nbsp;solder&nbsp;in the buttons and an IDC box header to the gamepad PCB - No more tedious button wiring!

![](https://cdn-learn.adafruit.com/assets/assets/000/029/890/medium800/raspberry_pi_hero_pi2_pigrrl_adabot.jpg?1453094025)

## Project Expectations

This project is geared towards beginners, but is still a big project to take on. This guide will walk you through all the necessary steps to wire, assemble and build your very first Raspberry Pi game console. It does require a good amount of soldering, wire tinning and good ol' elbow grease, but don't be discouraged! If your dedicated to take on this project, it'll only take&nbsp;a weekend to make.

![](https://cdn-learn.adafruit.com/assets/assets/000/029/900/medium800/raspberry_pi_parts.jpg?1453136465)

## Adafruit Parts

- [Raspberry Pi 2](https://www.adafruit.com/products/2358)or [Raspbery PI 3](https://www.adafruit.com/products/3055)
- [2.8" PiTFT Plus](https://www.adafruit.com/products/2298)
- [PiGRRL Gamepad PCB](https://www.adafruit.com/products/3015)
- [PowerBoost 1000c](https://www.adafruit.com/products/2465)
- [2500mAh battery](https://www.adafruit.com/products/328)
- [PAM8302 2.5W Audio Amp](https://www.adafruit.com/products/2130)
- [Mini Metal Speaker](https://www.adafruit.com/products/1890)
- [40pin GPIO ribbon cable](https://www.adafruit.com/products/1988)
- [Slide Switch](https://www.adafruit.com/products/805)
- 10x&nbsp;[6mm](https://www.adafruit.com/products/367)&nbsp;+ 2x&nbsp;[12mm tactile buttons](https://www.adafruit.com/products/1119)
- 1x&nbsp;[2by20 pin IDC box header](https://www.adafruit.com/products/1993)

## Tools and Supplies

- [3D Printer](https://www.adafruit.com/category/128)&nbsp;+&nbsp;[Filament](https://www.adafruit.com/products/2080)
- [Soldering Iron](https://www.adafruit.com/categories/84)&nbsp;+&nbsp;[Solder](https://www.adafruit.com/categories/84)
- [30AWG](https://www.adafruit.com/products/2051)&nbsp;+ [26AWG](https://www.adafruit.com/products/1970)&nbsp;Wire
- [Helping Third Hands](https://www.adafruit.com/products/291)&nbsp;/&nbsp;[Panavise](https://www.adafruit.com/products/151)
- [Heat Shrink](https://www.adafruit.com/products/1649)
- Glue / Mounting Tack
- [Wire Stripper](https://www.adafruit.com/products/527)&nbsp;/&nbsp;[Cutters](https://www.adafruit.com/products/152)
- Filing Tool / Hobby Knife
- 14x #4-40 3/8 machine screws
- 6x #2-56 3/8 machine screws
- [#4-40 Screw Tap](https://www.amazon.com/Vermont-American-20058-Carbon-Machine/dp/B00062BKNS/)
- [#2-56 Screw Tap](https://www.amazon.com/uxcell-Machine-Thread-Pitch-Flutes/dp/B07Y4YHDTF)

# PiGRRL 2

## Circuit Diagram

![](https://cdn-learn.adafruit.com/assets/assets/000/029/805/medium800/raspberry_pi_pigrrl2-circuit-diagram.jpg?1453066163)

## Wired Connections

The diagram above depicts the connections for the power, audio and gamepad. Use this as a reference for wiring the components. Note, the length of wires and position of components are not exactly how the circuit will be - it’s just a diagram to show connections.

The 2.8" PiTFT connects to the Raspberry Pi's GPIO header. A GPIO ribbon cable plugs into the GPIO&nbsp;breakout&nbsp;of the PiTFT and connects to the PiGRRL gamepad PCB.&nbsp;

# PiGRRL 2

## 3D Printing

![](https://cdn-learn.adafruit.com/assets/assets/000/029/770/medium800/raspberry_pi_filament-2080.jpg?1453048387)

## Material Options

The top case, bottom case and shoulder mount should&nbsp;be printed in hard plastic like PLA, ABS or other. We recommend using PLA to minimize warping. ABS and other filaments requires a heated bed.

![](https://cdn-learn.adafruit.com/assets/assets/000/029/769/medium800/raspberry_pi_printed-parts.jpg?1453048326)

## Parts

Download the parts and print them out accordingly - referencing the table below for material suggestions. If you don't have access to a 3D printer, use a service like [3DHubs.com](http://3dhubs.com)&nbsp;to&nbsp;send them to you.

[Download STLs](http://www.thingiverse.com/thing:1277483)
[Download Source](http://a360.co/1JIFbDc)
## Dimensions

- Top Part – 141mm x 91mm x 18mm (5.55in x 3.85in x 0.71in)
- Bottom Part – 141mm x 91mm 16mm (5.55in x 3.85in x 0.63in)

## Tap Screw Holes

After the parts are finished printing, you'll need to tap the standoffs with screw holes to create the threads for mounting the components.&nbsp;Use a #4-40 and #2-56 sized tap or use machine screws.

![raspberry_pi_parts_tap_1.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/771/medium640/raspberry_pi_parts_tap_1.jpg?1453048821)

![raspberry_pi_parts_tap_2.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/772/medium640/raspberry_pi_parts_tap_2.jpg?1453048838)

![raspberry_pi_parts_tap_3.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/773/medium640/raspberry_pi_parts_tap_3.jpg?1453048857)

![raspberry_pi_parts_tap_4.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/774/medium640/raspberry_pi_parts_tap_4.jpg?1453048881)

Be careful tapping the standoffs&nbsp;from the top -To prevent puncturing the surface,&nbsp; **DO&nbsp;NOT** &nbsp;tap&nbsp;all the way through the standoff. Be careful not to&nbsp;tap too fast&nbsp;or forcefully to avoid damaging&nbsp;the standoffs.

![raspberry_pi_parts-over-tapped.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/775/medium640/raspberry_pi_parts-over-tapped.jpg?1453049140)

## Test Fit Openings

Use a hobby knife to remove any excess bits from printing. Lay the components over the standoffs to see if mounting holes line up. See if the port&nbsp;cutouts are in the right place. If they don't, use a filing tool to open them up.

## Finishing&nbsp;Parts

You can smooth the parts by applying epoxy resin like Smooth-On's XTC-3D. To finish&nbsp;the surface, wait for it to dry and sand it down. Apply a filler primer paint and a colored top coat of spray paint to make it extra smooth.

# PiGRRL 2

## Software

# Download & Burn RetroPie

Game emulation is handled by a package called _ **RetroPie**._ It’s a complete Linux distribution designed specifically for running classic games on Raspberry Pi.

[Download the current version from the RetroPie web site](https://retropie.org.uk/download/), then [write this to an SD card](../../../../adafruit-raspberry-pi-lesson-1-preparing-and-sd-card-for-your-raspberry-pi) using Etcher or similar software.

We’ll then make some modifications to tune this for the PiGRRL’s buttons and small display.

Setup will require an **HDMI monitor** , **USB keyboard** and a **network connection** (either **WiFi** or **Ethernet** ).&nbsp;This is best done _ **before** _ the Pi is enclosed in the PiGRRL case. If you have a spare Raspberry Pi board around, that’s an ideal option…you could&nbsp;prepare the software on that system and then move the card over to the PiGRRL 2.

# Setup RetroPie

Insert the RetroPie card to your Pi, attach monitor and keyboard (and Ethernet, if networking that way), then power the system from a USB power source (a USB phone charger or a powered USB hub can usually work). The system will automatically reboot once (it needs this to make use of the whole SD card), then on second boot it will ask to configure the game controls…

**The PiGRRL buttons don’t work yet; this is normal.** For initial setup, **use the USB keyboard** to select the D-pad directions (arrow keys), Start, Select, A and B keys. For anything else, just hold down the space bar or other key to skip that item . Don't worry, we'll re-do the keymap later once we've finished assembly! When finished, you’ll see a graphical interface called _Emulation Station_ where you’ll select games and other options.

Let’s **get this Raspberry Pi on the network** first. If using Ethernet, it’s a simple matter of plugging in. If WiFi, from the main EmulationStation screen, access the RetroPie settings using whatever key you’ve assigned as the “A” button. You’ll see **WIFI** &nbsp;in this list:

![](https://cdn-learn.adafruit.com/assets/assets/000/037/901/medium800/raspberry_pi_wifi1.png?1481149798)

Here you can select your WiFi network name and enter a password. It’s not beautiful, but gets the job done.

Select “Exit” when done to return to the EmulationStation UI…

![raspberry_pi_wifi2.png](https://cdn-learn.adafruit.com/assets/assets/000/037/903/medium640/raspberry_pi_wifi2.png?1481150107)

With networking enabled, we can now access the remaining software needed for the PiGRRL 2 experience. There are a couple ways to do this…

- **BEST:** Use an **ssh** terminal client to log into the Raspberry Pi at **retropie.local**   
This is recommended, as you can just copy-and-paste the commands that follow. The default name and password are “pi” and “raspberry,” respectively.
- **OR:** Press “F4” to exit EmulationStation for a command-line prompt (works, but you’ll need to type these commands _exactly_).

# Setup Virtual Environment

If you are installing on the Bookworm version of Raspberry Pi OS or later, you will need to install your python modules in a virtual environment. You can find more information in the [Python Virtual Environment Usage on Raspberry Pi](https://learn.adafruit.com/python-virtual-environment-usage-on-raspberry-pi) guide. To Install and activate the virtual environment, use the following commands:

```terminal
sudo apt install python3-venv
python -m venv env --system-site-packages
```

To activate the virtual environment:

```terminal
source env/bin/activate
```

To deactivate, you can use&nbsp;`deactivate`, but leave it active for now.

# Install Script Dependencies

Install the necessary script dependencies for the following steps:

```terminal
cd ~
sudo apt-get update
sudo apt-get install -y git python3-pip
pip3 install --upgrade adafruit-python-shell click
git clone https://github.com/adafruit/Raspberry-Pi-Installer-Scripts.git
```

# Install PiTFT (mirroring) Support

This first sequence configures the system for the PiTFT display:

```terminal
cd ~/Raspberry-Pi-Installer-Scripts
sudo -E env PATH=$PATH python3 pitft-fbcp.py
```

Select the “PiGRRL 2” option, which sets up various system parameters&nbsp;to match this project.

![](https://cdn-learn.adafruit.com/assets/assets/000/037/794/medium800/raspberry_pi_pitft-fbcp-1.png?1480997105)

![](https://cdn-learn.adafruit.com/assets/assets/000/037/795/medium800/raspberry_pi_pitft-fbcp-2.png?1480997118)

Answer “ **NO** ” to the reboot question…

# Installing Keypress (retrogame) support

let’s take care of this second script, which enables the PiGRRL buttons:

```terminal
cd ~/Raspberry-Pi-Installer-Scripts
sudo -E env PATH=$PATH python3 retrogame.py
```

Again, select the “PiGRRL 2” option. When finished, _now_ you can reboot when prompted.

![](https://cdn-learn.adafruit.com/assets/assets/000/037/796/medium800/raspberry_pi_retrogame-pigrrl2.png?1480997131)

After rebooting, the HDMI monitor may display a “no signal” message. This is normal. Not all monitors can handle the resolution setting we’re using. Once the PiTFT is wired up, that will be the primary display.

Also, **after&nbsp;the system is assembled with the PiTFT and controls** , you’ll need to **re-do the controller setup.** This might wait ’til all the parts are **assembled in the case.**

From the main EmulationStation screen, press whatever key was assigned to the “Start” button to access the main menu. You’ll find an option here for “CONFIGURE INPUT.”

Go through the control setup process again using the PiGRRL buttons now instead of the keyboard; assign the D-pad directions, Start and Select buttons, A, B, X and Y. For anything else, hold down a key or button to skip it.

![raspberry_pi_input.png](https://cdn-learn.adafruit.com/assets/assets/000/037/904/medium640/raspberry_pi_input.png?1481150975)

## Uploading ROMs

Check out the Wiki on the RetroPie Setup page for how to upload ROMs:

[Retropie - Uploading ROMs](https://github.com/petrockblog/RetroPie-Setup/wiki/How-to-get-ROMs-on-the-SD-card)
## Exiting ROMs

Retropie has changed how to exit out of ROMs/Emulators. Hold down the&nbsp; **Pause & Start** buttons at the same time to exit.

## Remapping Controls

The buttons are premapped to work with NES and SNES emulators. If you'd like to remap the controls,&nbsp;you'll need to modify the **retrogame.cfg** file in /boot.

Make sure the Raspberry Pi is configured for Wifi. Open up terminal and ssh into the Pi. (Default username: **pi** password: **raspberry** )

[Then follow the retrogame tutorial to set it up the way you like!](../../../../retro-gaming-with-raspberry-pi/adding-controls-software)

# Testing Controls

If you log in (via SSH or F4 shell) you can see exactly what keypresses are detected by running **evtest** then select 1 (or whatever **retrogame** is numbered):

![](https://cdn-learn.adafruit.com/assets/assets/000/037/969/medium800/raspberry_pi_evtest.png?1481499689)

Make sure each keypress works and matches the table below!

## Default Controls

Below is a table of the controls set to the GPIO. Use this as a reference if you ever need to revert when changing something.

# PiGRRL 2

## Gamepad

![](https://cdn-learn.adafruit.com/assets/assets/000/029/747/medium800/raspberry_pi_gamepad_parts.jpg?1452878891)

## PiGRRL Gamepad Design

The gamepad&nbsp;was designed in&nbsp;EagleCAD and available to download and modify. It's also a shared project on Oshpark.

[PiGRRL Gamepad PCB Now In Stock!](https://www.adafruit.com/products/3015)
[PiGRRL-ButtonPCB.zip](https://learn.adafruit.com/system/assets/assets/000/029/938/original/PiGRRL-ButtonPCB.zip?1453489766)
[Oshpark Project](https://oshpark.com/shared_projects/i2TaIEic)
![](https://cdn-learn.adafruit.com/assets/assets/000/034/652/medium800/raspberry_pi_pigrrl-2-gamepad-pcb.png?1470835416)

## PiGRRL Gamepad PCB

Let's start assembly by putting the gamepad together. Gather up 10x 6mm tactile buttons and a 40pin IC box header.&nbsp;

## Install&nbsp;IC Box Header

Insert the box header into the header labeled pin&nbsp;on the back of the gamepad PCB. Make sure the "notch" opening is pointing towards the "header" label. Secure it in place by adding&nbsp;mounting tack to the sides. Now we can secure the PCB to a Panavise to assist while soldering.

![raspberry_pi_gamepad_header.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/778/medium640/raspberry_pi_gamepad_header.jpg?1453054357)

![raspberry_pi_gamepad_insert_tack_header.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/779/medium640/raspberry_pi_gamepad_insert_tack_header.jpg?1453054379)

## Solder IC Box Header

Flip&nbsp;the&nbsp;gamepad PCB over so the header pins are facing up. Now heat up&nbsp;the&nbsp;soldering iron and apply solder to each of the 40 pins on the header. Ensure the solder joints are clean with no cold solder joints or blobs. They should look like Hershey's Kisses.

![raspberry_pi_gamepad_header_solder_start.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/780/medium640/raspberry_pi_gamepad_header_solder_start.jpg?1453054552)

![raspberry_pi_gamepad_header_soldered.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/781/medium640/raspberry_pi_gamepad_header_soldered.jpg?1453054656)

![](https://cdn-learn.adafruit.com/assets/assets/000/029/784/medium800/raspberry_pi_gamepad_btn_flatten.jpg?1453054948)

## Prep 6mm Tactile Buttons

To make it easier to insert the buttons to the PCB, use a pair of flat plier to&nbsp;straighten out&nbsp;the four leads of each button.

## Install 6mm Tactile Buttons

Insert each button into the through-hole spots on the gamepad PCB. Once installed, place your hand over the buttons and bend each of the leads inward so they "bite" onto the PCB - This will help hold them in place.

![raspberry_pi_gamepad_install_btns.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/782/medium640/raspberry_pi_gamepad_install_btns.jpg?1453054763)

![raspberry_pi_gamepad_installed_btns.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/783/medium640/raspberry_pi_gamepad_installed_btns.jpg?1453054809)

If you are using the elastomer buttons, they're still possible to use, but they wont sit perfectly flat. That's OK just make them as flat as you can!

![raspberry_pi_rubby.jpg](https://cdn-learn.adafruit.com/assets/assets/000/037/053/medium640/raspberry_pi_rubby.jpg?1478548473)

## Solder Buttons to Gamepad PCB

Secure the gamepad PCB to a Panavise and solder up the buttons. Make sure solder joints are clean like you did on the pins of the IC box header.

![raspberry_pi_gamepad_solder_btns.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/785/medium640/raspberry_pi_gamepad_solder_btns.jpg?1453055140)

![](https://cdn-learn.adafruit.com/assets/assets/000/029/786/medium800/raspberry_pi_gamepad_soldered_btns.jpg?1453055230)

## Soldered Gamepad PCB

Here's what the soldered gamepad will look like.&nbsp;Clean and Shiny!&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/029/787/medium800/raspberry_pi_gamepad_tap_holes.jpg?1453055322)

## Tap Gamepad PCB Mounting Holes

Now is a good time to tap the mounting holes of the gamepad PCB. We need to create threads on each hole so that it's easier to mount to the case. You can use a #4-40 sized tap tool, or a #4-40 machine screw to do this, just make sure to fasten as straight as you can.

# PiGRRL 2

## PiTFT Display

![](https://cdn-learn.adafruit.com/assets/assets/000/029/917/medium800/raspberry_pi_pitft-trace-18.jpg?1453326529)

## GPIO&nbsp;#18 - LED Backlighting

Flip the 2.8" PiTFT display over and locate the pad with **label #18.** We need to cut this trace in order to properly use GPIO 18 (The Y Button is wired to this GPIO). By default, when GPIO 18 is triggered to ground, it will disable the LED backlighting on the display - Cutting the trace here will disable that feature.

![](https://cdn-learn.adafruit.com/assets/assets/000/029/916/medium800/raspberry_pi_pitft-trace-18-cut.jpg?1453326147)

## Cut Trace #18

Use a hobby knife to mark&nbsp;in between the two pads and make sure it is deep enough to fullly break the trace.

That's pretty much all we need to do to the PiTFT display!

# PiGRRL 2

## PiCable

![](https://cdn-learn.adafruit.com/assets/assets/000/029/788/medium800/raspberry_pi_picable-measurement-108mm.jpg?1453055803)

## PiCable Resizing

In this section, we'll resize the PiCable so it's more manageable&nbsp;once installed inside the case. Its some what optional - you can skip it but if you find space too tight when closing the case, you may want to resize the PiCable.

The stock ribbon cable is 152.4mm(6") in length, but I've found&nbsp;shortening it down to 108mm is just the right fit for the length we need.

## Measure, Mark and Cut Ribbon Cable

Use a pair of calipers or measuring tape to get the desired length and mark the ribbon cable - Tape, marker or otherwise.

![raspberry_pi_picable_marking.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/789/medium640/raspberry_pi_picable_marking.jpg?1453058732)

![raspberry_pi_picable_sissors.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/790/medium640/raspberry_pi_picable_sissors.jpg?1453058757)

![](https://cdn-learn.adafruit.com/assets/assets/000/029/796/medium800/raspberry_pi_picable_cut.jpg?1453059089)

## Cut Cable

With the cable split in two, set aside the longer end and keep the short end handy - we need to remove the connector from the end of it.

## Removing Connector

Take a close look at the bottom of the connector. You'll see two tiny holes near each side. Now take a look at the side. You'll see the connector has a clip that is held in place with a notch. The goal here is to push that clip away from the notch so we can fit the top from the connector. You can fit&nbsp;something small and pointy such as a needle into the holes and push the clip away from the notch while pulling the top from the connector. When the clip is free, carefully pull the top part out. You'll need to do this for both&nbsp;sides.

![raspberry_pi_picable-bottom-side-clip.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/792/medium640/raspberry_pi_picable-bottom-side-clip.jpg?1453058953)

![raspberry_pi_picable_side_clip.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/793/medium640/raspberry_pi_picable_side_clip.jpg?1453059007)

![raspberry_pi_picable_pull_out_top.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/794/medium640/raspberry_pi_picable_pull_out_top.jpg?1453059033)

![raspberry_pi_picable_top.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/795/medium640/raspberry_pi_picable_top.jpg?1453059055)

Danger: 

## Peel Cable from Connector

With the top removed from the connector,&nbsp;carefully peel the ribbon cable from the connector. You should be left with the top part and the female connector. You can discard the ribbon cable.

![raspberry_pi_picable_peel_cable.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/797/medium640/raspberry_pi_picable_peel_cable.jpg?1453059486)

![raspberry_pi_picable_connector_parts.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/798/medium640/raspberry_pi_picable_connector_parts.jpg?1453059517)

Danger: 

## Install Connector to Shortened Ribbon Cable

Grab the longer piece of the ribbon cable from earlier and lay the cut end over the top piece - The ribbon cable should nicely fit into the grooves of the top piece. Now grab the female connector and insert the top piece into back onto the connector. Make sure the arrow/triangle marking lines up with the side of the ribbon cable with the single white colored wire. Press the two pieces together and make sure the clips nicely fit into the sides of the connector.

![raspberry_pi_picable_insert_cable_over_top.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/799/medium640/raspberry_pi_picable_insert_cable_over_top.jpg?1453059831)

![raspberry_pi_picable_insert_top_to_connector.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/800/medium640/raspberry_pi_picable_insert_top_to_connector.jpg?1453059881)

![raspberry_pi_picable_clip_side_to_connector.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/801/medium640/raspberry_pi_picable_clip_side_to_connector.jpg?1453059914)

![](https://cdn-learn.adafruit.com/assets/assets/000/029/802/medium800/raspberry_pi_picable_smash_top_to_connector.jpg?1453060176)

## Mash&nbsp;Top Piece to Connector

Unless you're incredibly strong, you won't be able to press the top piece back onto&nbsp;the connector because it's hard to puncture the wire with the pointy teeth. The easiest way to do this&nbsp;is to use a rubber mallet to&nbsp;smash the pieces together. I recommend doing this on a hard surface (like on the floor) while holding the connector in place. Tap the top piece in sessions&nbsp;as straight as you can and be careful not to mash&nbsp;your fingers in the process. &nbsp;If all goes well, the teeth from the connector will puncture the ribbon cable and close the two pieces back together.&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/029/803/medium800/raspberry_pi_picable-shortened.jpg?1453060509)

## Shortened Pi Ribbon Cable

And there you have it! A shortened Raspberry Pi Ribbon Cable. Bit of a hack, I know - But it really does make closing the case much easier in when we're all done.

# PiGRRL 2

## Amp & Speaker

## Prep PAM8302 Amp

Secure the amp to a pair of helping third hands. Use the tip of the soldering iron to heat up solder and&nbsp;apply&nbsp;to the&nbsp; **VIN** , **GND** , **A+** , **A–** , **+** and **–** pins. This will make it easier to solder wires to the pins.

![raspberry_pi_amp_prep.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/806/medium640/raspberry_pi_amp_prep.jpg?1453069874)

![raspberry_pi_amp_tin_pins.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/808/medium640/raspberry_pi_amp_tin_pins.jpg?1453069939)

![](https://cdn-learn.adafruit.com/assets/assets/000/029/809/medium800/raspberry_pi_amp_wires.jpg?1453070235)

## Measure Wires for Amp and Speaker

We'll need two pieces of 30AWG wires to connect the speaker to the amp. We recommend using silicone-coated stranded wire. Measure about 9cm in length for each wire. You don't have to use different colored wires, but we recommend it to help tell them apart.

## Strip and Tin Wires

Use a pair of wire strippers to remove about 4mm of insulation from the tips of each wire. To keep the tips of wires from fraying, use the tip of the soldering iron to apply solder. You can bundle the tips of wires together and use a pair of helping third hands to tin the tips at the same time.

![raspberry_pi_amp-wire-strip.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/812/medium640/raspberry_pi_amp-wire-strip.jpg?1453071208)

![raspberry_pi_amp-wire-tin.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/813/medium640/raspberry_pi_amp-wire-tin.jpg?1453071296)

## Connect Wires to Speaker

Remove the wires connected to the speaker, they're too short. We'll need to connect the new pieces of wire we just prepped onto the solder pads of the speaker. Secure the speaker to the helping third hands - Since there's a magnet on it, we can stick it to one of the grabber arms. Reference the photo to see which is positive (right pad) and negative (left pad). Next, slip on a piece of heat shrink tubing to group the two wires.

![raspberry_pi_speaker_wire_solder.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/814/medium640/raspberry_pi_speaker_wire_solder.jpg?1453071590)

![raspberry_pi_speaker_heatshrink.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/815/medium640/raspberry_pi_speaker_heatshrink.jpg?1453071625)

## Connect Wires to Amp

Secure the amp back onto the helping third hands.&nbsp;Solder the positive wire from the speaker to the positive output pin on the amp, then, solder the negative wire to the negative output pin. Now we can proceed to work on the power circuit.

![raspberry_pi_amp_solder_speaker_wire.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/816/medium640/raspberry_pi_amp_solder_speaker_wire.jpg?1453071888)

![raspberry_pi_amp_speaker.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/817/medium640/raspberry_pi_amp_speaker.jpg?1453071916)

# PiGRRL 2

## Power Circuit

![](https://cdn-learn.adafruit.com/assets/assets/000/029/818/medium800/raspberry_pi_powerboost_tin_pins.jpg?1453073899)

## Prep PowerBoost 1000C

Secure the PowerBoost to the pair of helping third hands. Apply solder to the following pins: **Positive(+)** out, **Negative(–)** out, **EN** , **GND** , **G** and **5V**.

## Measure Wires for PowerBoost and Amp

We'll need about 3cm in length of 30AWG wire to connect the Amp to the PowerBoost 1000C. Use wire strippers to remove about 4mm of insulation from each tip and apply solder to tin them. Now secure the amp to the helping third hands and solder the wires to the **Vin** &nbsp;and **Gnd** &nbsp;pins.

![raspberry_pi_powerboost_amp_wires.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/819/medium640/raspberry_pi_powerboost_amp_wires.jpg?1453074383)

![raspberry_pi_solder_powerboost_amp_wires.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/820/medium640/raspberry_pi_solder_powerboost_amp_wires.jpg?1453075597)

## Connect Amp to PowerBoost 1000C

Slip on a piece of heat shrink tubing to the wires connected to the&nbsp; **Vin** &nbsp;and **Gnd** &nbsp;pins. Next, secure the PowerBoost 1000C to the helping third hands. Solder the **VIN** &nbsp;wire from the amp to the **5V** pin on the PowerBoost. Then,&nbsp;solder the **Gnd** &nbsp;wire from the amp to the **G** pin on the PowerBoost 1000C.

![raspberry_pi_solder_amp_wires_powerboost.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/821/medium640/raspberry_pi_solder_amp_wires_powerboost.jpg?1453075691)

![](https://cdn-learn.adafruit.com/assets/assets/000/029/822/medium800/raspberry_pi_amp_powerboost.jpg?1453075814)

## Connected Amp, Speaker and PowerBoost 1000C

Now our amplifier and speaker are wired up the PowerBoost 1000C.

## Test fit Power Switch

Next up we need to connect our slide switch to the PowerBoost 1000C. First, we should do a test fit and see if our switch can fit into the case. Insert the switch into the switch cutout of the bottom case. Press it all the way through. If it's too tight, you can use a filing tool to open it up.

![raspberry_pi_testfit_switch_1.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/823/medium640/raspberry_pi_testfit_switch_1.jpg?1453076084)

![raspberry_pi_testfit_switch_2.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/824/medium640/raspberry_pi_testfit_switch_2.jpg?1453076146)

![raspberry_pi_testfit_switch_3.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/825/medium640/raspberry_pi_testfit_switch_3.jpg?1453076162)

![raspberry_pi_testfit_switch_4.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/826/medium640/raspberry_pi_testfit_switch_4.jpg?1453076183)

## Prep Slide Switch

Remove one of the legs from the slide switch. Secure the switch to the helping third hands and apply solder to the two remaining legs. Now we'll need two new 30AWG wires that measure abot 7cm in length. Strip and tin the tips of each wire.

![raspberry_pi_switch_tin_leads.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/827/medium640/raspberry_pi_switch_tin_leads.jpg?1453076266)

![raspberry_pi_switch_prep_wires.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/828/medium640/raspberry_pi_switch_prep_wires.jpg?1453076297)

## Connect Wires to Switch

Solder the two wires to the two leads of the slide switch. Add pieces of heat shrink tubing to each&nbsp;terminal to insulate them.

![raspberry_pi_switch_solder_wires.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/829/medium640/raspberry_pi_switch_solder_wires.jpg?1453076430)

![raspberry_pi_switch_heatshrink.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/830/medium640/raspberry_pi_switch_heatshrink.jpg?1453076472)

## Connect Switch to PowerBoost 1000C

Now we need to solder the two wires to the **EN** and **GND** pins of the PowerBoost. The polarity doesn't matter that much here. The switch can be installed in your prefered position later (ie. Up position is ON, Down position if OFF, it's up too you!).

![raspberry_pi_switch_wired_powerboosted.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/831/medium640/raspberry_pi_switch_wired_powerboosted.jpg?1453076622)

![](https://cdn-learn.adafruit.com/assets/assets/000/029/832/medium800/raspberry_pi_powerboost_amp_speaker_switch.jpg?1453076736)

## Wired Power Circuit

Now we have our amp, speaker, PowerBoost and slide switch all wired up and connected. Now's a good time to take a break or continue!

# PiGRRL 2

## Pi Audio

![](https://cdn-learn.adafruit.com/assets/assets/000/029/833/medium800/raspberry_pi_raspi_amp_wires_prep.jpg?1453082017)

## Prep Wires for Rasp Pi Audio

To&nbsp;connect the amp to the Raspberry Pi 2, we'll need two wires.&nbsp;Cut two pieces of 30AWG wires to about 10cm in length. Strip and tin the tips of each wire.

![](https://cdn-learn.adafruit.com/assets/assets/000/029/834/medium800/raspberry_pi_raspi-tin-audio.jpg?1453082468)

## Prep Raspberry Pi Audio Pins

On the bottom of the Raspberry Pi 2 PCB, locate the audio jack and inspect the three pin connected to the component.

Take note of the two circles highlighting&nbsp;the pins. The left pin (blue) will connect to the negative pin on the amp, while the right pin (red) connects to the positive pin. The middle pin does not need to be tinned (disregard the tinning in the photo).

Place the tip of the soldering iron over the pin and apply a **small amount** &nbsp;of solder. This will make&nbsp;connecting wires to the audio amp much easier.

![](https://cdn-learn.adafruit.com/assets/assets/000/029/835/medium800/raspberry_pi_raspi-amp-wires-soldered.jpg?1453083411)

## Connect Wires to Raspberry Pi

Solder the new wires to the pins on the bottom of the Raspberry Pi. The negative(blue) wire connects to the left pin, while the positive(ed) wire connects to the right pin.

![](https://cdn-learn.adafruit.com/assets/assets/000/029/836/medium800/raspberry_pi_raspi_pb_switch_amp_speaker_circuit.jpg?1453083991)

## Connect Wires to Amp

Solder the negative (blue) wire to the A– pin on the amp, and the positive (red) wire to the A+ pin on the amp.

Danger: 

# PiGRRL 2

## Shoulder Buttons

![](https://cdn-learn.adafruit.com/assets/assets/000/029/838/medium800/raspberry_pi_shoulder_btns_prep.jpg?1453084805)

## Prep 12mm Tactile&nbsp;Buttons

Next up we need to prepare two 12mm buttons for our shoulder L and R buttons.

Start by clipping two of the four legs from each button. Use a pair of flat pliers to flatten out the legs so they point out like in the photo. Secure the button to a pair of helping third hands and apply solder to each leg to tin them.

![](https://cdn-learn.adafruit.com/assets/assets/000/029/839/medium800/raspberry_pi_shoulder_btns_wire.jpg?1453084832)

## Prep Wires for Shoulder Buttons

We'll need two sets of wires (four total) to measure about 14cm in length. Strip and tin the tips from each wire and thread them through one big piece of heat shrink tubing. This will keep the wires together in a neat bundle.

![](https://cdn-learn.adafruit.com/assets/assets/000/029/840/medium800/raspberry_pi_shoulder_btns_solder.jpg?1453084846)

## Connect Wires to Buttons

Solder wires to the legs of each button - Like before, use a pair of helping third hands to assist you. Polarity doesn't matter too much on these buttons, but you can reference the photo.

![](https://cdn-learn.adafruit.com/assets/assets/000/029/842/medium800/raspberry_pi_shoulder_btns_wiress_ready.jpg?1453084876)

## Shoulder Buttons

OK, now we have our shoulder buttons prepped and ready to wire into our gamepad PCB. The next page will go through the final connections for our build.

# PiGRRL 2

## Final Connections

![](https://cdn-learn.adafruit.com/assets/assets/000/029/837/medium800/raspberry_pi_powerboost_gamepad_wires.jpg?1453084645)

## Prep Wires for Gamepad PCB

Now we need to connect our gamepad PCB to the PowerBoost 1000C. We'll need two 26AWG (which is thicker than the 30AWG we've been using so far) that's about 14cm in length. Like before, strip and tin the ends of each wire. Then, let's slip on a long piece of heat shrink tubing to keep the two wires together.

## Prep Power Pins on Gamepad PCB

Locate the power label&nbsp;on the gamepad PCB and take note of the **5V** and **GND** pins. Flip the gamepad PCB over and secure it to a Panavise to hold it in place. Apply solder to the two pins and solder in our two 26AWG wires. Use the photo to reference which wires goes were (red right, white left).&nbsp;

![raspberry_pi_gamepad_tin_pb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/843/medium640/raspberry_pi_gamepad_tin_pb.jpg?1453085817)

![raspberry_pi_gamepad_wires_pb.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/844/medium640/raspberry_pi_gamepad_wires_pb.jpg?1453085846)

## Connect Shoulder Buttons to Gamepad PCB

Locate the bumper labeled pins on the opposite side of the gamepad PCB. Referencing the photo, from the bottom up, the order of pins are: **Ground, Ground, R button, L button**. Once you're familiar with the pin order,&nbsp;solder in the wires from the 12mm tactile buttons.&nbsp;

![raspberry_pi_gamepad_tin_bumpers.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/845/medium640/raspberry_pi_gamepad_tin_bumpers.jpg?1453086455)

![raspberry_pi_gamepad_wires_bumpers.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/846/medium640/raspberry_pi_gamepad_wires_bumpers.jpg?1453086488)

![](https://cdn-learn.adafruit.com/assets/assets/000/029/847/medium800/raspberry_pi_pb_wire_gamepad.jpg?1453087031)

## Connect Gamepad PCB to PowerBoost 1000C

Now we can solder in the two wires connected to the power pins of the gamepad PCB&nbsp;to the power output pin on the PowerBoost. The 5V wire from the gamepad connects to the positive pin on the PowerBoost, and the Ground wire from the gamepad connects to the negative pin on the PowerBoost.

![](https://cdn-learn.adafruit.com/assets/assets/000/029/848/medium800/raspberry_pi_wiring_finished.jpg?1453087383)

## Final Wired Components

OK, now all of our wires are connected, yay! Our components are connected and&nbsp;we're ready to mount them to the case. In the next page, we'll finish up our build!

## Test Components

Its&nbsp;good practice to test all of our components before we start mounting things to the enclosure. Just as a sanity check, this ensures our components and wiring is all good and working. Go ahead and insert your microSD card into the Raspberry Pi - make sure the software is already installed and loaded.

Once thats sorted, plug in the JST connector from our battery into the PowerBoost 1000C. Next, plug the Pi ribbon cable into the PiTFT GPIO breakout and connect the other end to the PiGRRL Gamepad. Then, lay the PiTFT over the Raspberry Pi and press it down to connect together the GPIOs until they’re fully seated.

Now you can flip the slide switch to power on the circuit. The PiTFT should display the boot up scripts and automatically launch RetroPi Emulationstation. Test out the DPad and buttons to see if everything works as expected. You should hear audio once a ROM is loaded. If you don’t have any loaded, reference the software page for uploading ROMs (You should be able to launch Quake from the Ports section).

If the audio isn’t working, or the buttons aren’t triggering, you’ll want to double check your wiring. If you are not sure how to use a multi-meter to check for any shorts and continuity, you may want to post up any specific issues in the Adafruit Forums, where our dedicated engineering support team can help you trouble shoot.

If everything works during your test, you should be safe to power down the Raspberry Pi and move onto the next page.

# PiGRRL 2

## Mount Components

## Install 2.8" PiTFT

The first component we need mount to the case is the display screen. Before we do that, we'll need to insert the PiTFT rubber buttons into the case. Place them over the cutouts from the inside of the top case and press them into place.

Now that the PiTFT&nbsp;button&nbsp;actuators&nbsp;are in place, lay the PiTFT screen over the case. Line up the mounting holes with the standoffs. Then, insert #4-40 3/8 sized machine screws into each mounting hole and fasten them into place. Be careful not to apply excess force, and fasten slowly.

&nbsp;

![raspberry_pi_pitft_btns_install.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/849/medium640/raspberry_pi_pitft_btns_install.jpg?1453087727)

![raspberry_pi_pitft_install_case.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/850/medium640/raspberry_pi_pitft_install_case.jpg?1453087761)

![raspberry_pi_pitft_mount_screws.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/851/medium640/raspberry_pi_pitft_mount_screws.jpg?1453087791)

![raspberry_pi_pitft_mounted.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/852/medium640/raspberry_pi_pitft_mounted.jpg?1453087823)

Danger: 

## Install Gamepad PCB

Next up, let's fasten #4-40 3/8 sized machine screws into the mounting holes on the corners of the gamepad PCB. Insert them from the top of the PCB so that they're just barely protruding from the back side. This makes it easier to mount it to the standoffs in the case.

Now, insert the rubber **D-Pad** , **Action**  **Buttons** and **Pause/Start** actuators into the cutouts of the top case part. Place the gamepad PCB over the standoffs and line them up with screws.&nbsp;Slowly (and carefully) fasten the screws into the standoffs. However,&nbsp; **DO NOT** fasten them all the way through! Only fasten them down until they're deep enough to be lower than the height of the case. Please reference the photo - if screws are&nbsp;inserted too far, they could protrude through the surface of the case.

![raspberry_pi_gamepad_install_screws.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/853/medium640/raspberry_pi_gamepad_install_screws.jpg?1453088209)

![raspberry_pi_gamepad_install_rubber_btns.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/854/medium640/raspberry_pi_gamepad_install_rubber_btns.jpg?1453088240)

![raspberry_pi_gamepad_installed_screws.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/855/medium640/raspberry_pi_gamepad_installed_screws.jpg?1453088280)

![raspberry_pi_gamepadn_pitft_mounted.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/856/medium640/raspberry_pi_gamepadn_pitft_mounted.jpg?1453088318)

## Connect Pi Cable

Next, we can install the Pi Cable to conenct the Gamepad PCB to the PiTFT display. The orientation of the Pi cable is important, so reference the photo and follow the markings.

![raspberry_pi_picable_install_pitft.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/857/medium640/raspberry_pi_picable_install_pitft.jpg?1453089009)

![raspberry_pi_picable_install_gamepad_2.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/858/medium640/raspberry_pi_picable_install_gamepad_2.jpg?1453089041)

![](https://cdn-learn.adafruit.com/assets/assets/000/029/859/medium800/raspberry_pi_picable_installed.jpg?1453089230)

## Connected PiTFT and Gamepad

Now our PiTFT display and Gamepad PCB are mounted to the case. Press the buttons on the PiTFT and Gamepad to test them and see they feel good. If the buttons get stuck, the gamepad&nbsp;isn't flush with the standoffs.&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/029/860/medium800/raspberry_pi_speak_install_case.jpg?1453089418)

## Install Speaker

Let's go ahead and pop the speaker into the case. Lay the speaker over the&nbsp;cavity with the grill and press it down to snap it into place. The wire should be oriented in a position so it's not in the way of the corner standoff.

## Shoulder Button Mount

Next up we need to mount our two shoulder buttons to the shoulder mounting piece. To do that, we can use adhesives such as E600 or hotglue - But I've found using mounting tack works just fine (plus, it makes it adjustable if we don't position it correctly the first time around). Add the tack to the back of the 12mm button and position them over the two recessed square spots on the mounting part. Press them down to stick them into place.

![raspberry_pi_shoulder_btns_tack.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/862/medium640/raspberry_pi_shoulder_btns_tack.jpg?1453089822)

![raspberry_pi_shoulder_btns_mount.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/863/medium640/raspberry_pi_shoulder_btns_mount.jpg?1453089855)

## Shoulder Button (cont.)

Fasten four #2-56 3/8 &nbsp;into the standoffs of the shoulder mount. Screw them in until the barely protrude the standoff - this is going to make it easier to mount it to the case. Next, insert the rubber shoulder button actuator into the cutout of the bottom case part.

![raspberry_pi_shoulder_btns_screws.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/864/medium640/raspberry_pi_shoulder_btns_screws.jpg?1453090197)

![raspberry_pi_shoulder_btns_install.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/865/medium640/raspberry_pi_shoulder_btns_install.jpg?1453090259)

## Install&nbsp;Shoulder Button Mount

Place the shoulder mount over the standoffs on the bottom case. Make sure the screws line up with the standoffs - they're position / orientation specific. Once they're lined up, carefully fasten the screws down. Here, you can fasten them all the way.

![raspberry_pi_shoulder_mount_install.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/866/medium640/raspberry_pi_shoulder_mount_install.jpg?1453090637)

![raspberry_pi_shoulder_mount_installed.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/867/medium640/raspberry_pi_shoulder_mount_installed.jpg?1453090670)

![](https://cdn-learn.adafruit.com/assets/assets/000/029/868/medium800/raspberry_pi_insert_switch.jpg?1453090881)

## Install Switch

Now if a good time to insert the slide switch into the bottom case. Take note of the OFF position of the slide and install it to your liking (I prefer down is OFF, up is ON).

## Install Raspberry Pi 2

Next up, lets mount the Pi to the bottom case. First, let's fasten #4-40 3/8 sized machine screws to the two mount holes on the back of the bottom case part. Like the previous mounting standoffs,&nbsp;fasten&nbsp;the screws so they're just barely protuding through the top of the standoffs. Then, lay the Pi over the standoffs and line up the screws with the mounting holes. Once in place, fasten the screws all the way until they're flush with the surface of the case.

![raspberry_pi_insert_screws_case_pi.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/869/medium640/raspberry_pi_insert_screws_case_pi.jpg?1453091105)

![raspberry_pi_insert_screws_stanoff_pi.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/870/medium640/raspberry_pi_insert_screws_stanoff_pi.jpg?1453091135)

![raspberry_pi_install_pi_case.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/871/medium640/raspberry_pi_install_pi_case.jpg?1453091174)

![raspberry_pi_fasten_screws_pi_case.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/872/medium640/raspberry_pi_fasten_screws_pi_case.jpg?1453091207)

## Mount PowerBoost 1000C

We'll need two #4-40 3/8 machine screws to install the PowerBoost to the case. Fasten the screws to the two mounting holes&nbsp;of the PowerBoost - This will create threads. Once they're made, lay the PowerBoost over the standoffs (close to the center bottom). Hold the PCB in place while fastening the screws to the standoffs. Don't fasten these screws all the way through, just deep enough they go past the heigh of the case - similar to the other components.

![raspberry_pi_powerboost_thread_screws.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/873/medium640/raspberry_pi_powerboost_thread_screws.jpg?1453091530)

![raspberry_pi_powerboost_mount_case.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/874/medium640/raspberry_pi_powerboost_mount_case.jpg?1453091560)

## Mount Amp

Insert and fasten a single #4-40 3/8 machine screw into the mounting hole of the amp PCB (should be the hole closest to the Adafruit logo) - This will help create the screw threads.&nbsp;Then,&nbsp;place the PCB over the standoffs and hole it down to fasten the screw into the standoff.

![raspberry_pi_amp_thread_hole.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/875/medium640/raspberry_pi_amp_thread_hole.jpg?1453091988)

![raspberry_pi_ampt_mount_case.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/876/medium640/raspberry_pi_ampt_mount_case.jpg?1453092018)

![](https://cdn-learn.adafruit.com/assets/assets/000/029/877/medium800/raspberry_pi_bat_connect_test.jpg?1453092148)

## Test PowerBoost Circuit

Grab the lipo battery and plug in the JST connector to the JST port on the PowerBoost 1000C. Flip the slide switch on, and see if the circuit works! The blue LED indicates the battery is charged and the circuit is powered on.

If the LED doesn't light up, you either have a defective PowerBoost, or a short. You'll have to double check your wiring for short using a a multi-meter. If you have any issues or questions, please post it on support forums at&nbsp;[http://forums.adafruit.com/](http://forums.adafruit.com/)

![](https://cdn-learn.adafruit.com/assets/assets/000/029/878/medium800/raspberry_pi_bat_place.jpg?1453092477)

## Install Lipo Battery

Now we can install the 2000mAh lipo battery. A good spot for it is right behind the PiTFT display. To keep it in place, we can use a piece of gaffers tape. Try to keep it up closely against PiCable. Position it like in the photo, closer to the right side to avoid intersecting with some of the components from the Pi.

![raspberry_pi_bat_place.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/879/medium640/raspberry_pi_bat_place.jpg?1453092583)

![raspberry_pi_bat_moun_tape.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/880/medium640/raspberry_pi_bat_moun_tape.jpg?1453092618)

## Almost Done!

In the next page, we'll close up the case and finish the build!

# PiGRRL 2

## Close It Up!

## Join Parts

Now its time to close it all up. Before that, make sure all of the wires are inside the case. Wires should be neaty tucked and away of kinking from any of the components.&nbsp;Bring the top and bottom parts together and press the bottom part together. They should snap together. Then, inspect the edges and see if everything is in place - no wires hanging out. If it looks good, start pressing the top area close together - Slowly. If you can't squeeze the top together, the battery could be in the way - be sure to check that and ensure its not in the way of any of the components.&nbsp;

![raspberry_pi_case_close_1.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/881/medium640/raspberry_pi_case_close_1.jpg?1453092868)

![raspberry_pi_case_close_2.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/882/medium640/raspberry_pi_case_close_2.jpg?1453092904)

![raspberry_pi_case_close_3.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/883/medium640/raspberry_pi_case_close_3.jpg?1453092953)

![raspberry_pi_case_close_4.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/884/medium640/raspberry_pi_case_close_4.jpg?1453092981)

## Screw Bottom Portion

There's two spots on the bottom that feature counter bore standoffs - insert a #2-56 3/8 machine screw and fasten them all the way. This will keep the bottom from coming part.

![raspberry_pi_case_screws.jpg](https://cdn-learn.adafruit.com/assets/assets/000/029/885/medium640/raspberry_pi_case_screws.jpg?1453093252)

![](https://cdn-learn.adafruit.com/assets/assets/000/029/886/medium800/raspberry_pi_insert_SDcard.jpg?1453093360)

## Insert microSD Card

Lastly, insert the microSD card if you haven't already. You should have already burnt the PiGRRL image to the SD card. If not, go ahead and do that now!

![](https://cdn-learn.adafruit.com/assets/assets/000/029/887/medium800/raspberry_pi_finished_build_2.jpg?1453093442)

## Completed Build!

Hazzah! The PiGRRL 2 game console is finally finished and ready to play! Turn it on and RetroPie / Emulationstation should automatically boot. The buttons&nbsp;are premapped to the expected controls. Reference the Software page for uploading ROMs and remapping controls.

## Share&nbsp;Your Creation With Us!

If you built PiGRRL 2, we'd love to see it and share it with the community! Post a&nbsp;make on the thingiverse project page, share it on Instagram or twitter with hashtag #PiGRRL2.&nbsp;

# PiGRRL 2

## Trouble Shooting

### 

Make sure you didn't plug the Pi cable in backwards,&nbsp;[you can use a multimeter](../../../../multimeters/overview?view=all) to check that these voltages are correct when the Pi is powered:

![](https://cdn-learn.adafruit.com/assets/assets/000/033/671/medium800/raspberry_pi_pinout.png?1467932997)

## Audio Issues

Are you hearing a strange&nbsp;sound when powering up the Pi? The battery might be in a bad spot where it's causing interference&nbsp;noise with the audio jack. If you remove&nbsp;the mounting screws from the Pi on the back of the bottom case, you can separate the two parts while it's still powered.&nbsp;

![](https://cdn-learn.adafruit.com/assets/assets/000/029/888/medium800/raspberry_pi_bat_repos_1.jpg?1453093710)

Once they're separated, reposition the battery and listen carefully to the noise. Position the battery in a spot where the noise is less prominent&nbsp;and mount it in place with tape or mounting tack.

Another option you can try is to adjust the pot on the sound amp. Lowering the gain&nbsp;may&nbsp;fix the sound interference when repositioning the battery doesn't work.

![](https://cdn-learn.adafruit.com/assets/assets/000/029/889/medium800/raspberry_pi_bat_repos_2.jpg?1453093726)

The best location for the battery I've found is directly tucked inbetween the Raspberry Pi and the PiTFT display.&nbsp;

## No Audio

Retropie has sound options built into the software. It may be muted or set to really low. To adjust it, press the "Start" button to bring up the Menu. Then, use the D-Pad to highlight “Sound Settings”. Use the “A” button to select and D-Pad to increase volume. Press the “B” button to exit.

## Pressing Button Turns Off Screen

If the PiTFT display turns black when you press one of the gamepad buttons, the trace that controls the backlighting might need to&nbsp;be cut deeper.&nbsp;The label **#18** &nbsp;on the back of the PiTFT is active&nbsp;by default - triggering it&nbsp;turns the display off. Make sure this trace is cut to deactivate this feature.

### 

You didn't cut the trace on the #18 pad, make sure to do that

## PiTFT&nbsp;Shows Only White Screen

&nbsp;If the PiTFT display only display a white screen, chances are the img wasn't properly burnt to the SDcard. Be sure to follow the steps [Easy SD Card Setup](http://elinux.org/RPi_Easy_SD_Card_Setup)&nbsp;guide to correctly burn the image.&nbsp;

## Custom Mute Function

If you're interested in making one of the PiTFT buttons mute the audio,&nbsp;Martin O'Hanlon made a function.

[Mute Function](http://www.stuffaboutcode.com/2016/01/pocket-pigrrl-adding-mute.html)
## Better Sound quality

[A suggestion from the forums](https://forums.adafruit.com/viewtopic.php?f=8&t=105366)!

> 1)Wrap the battery in copper tape and then electrical tape. Then you solder a wire from the ground of the audio circuit to the copper. It helps to solder to a random piece and then stick it to the battery so you're not soldering on the battery itself as it's dangerous.  
>   
> 2)Buy tiny ferrite beads and put them around the speaker wires. Ferrite beads provide EMI shielding and putting them around the speaker wires worked like a charm.

## Issues, Problems, Need Help?

If you encounter any technical problems with the Raspberry Pi software, components or otherwise, please post up your issue, including photos of your wiring on the Adafruit Forums. Our support team will be able to assist&nbsp;you there.

[Adafruit Forums](https://forums.adafruit.com/viewforum.php?f=36)
# PiGRRL 2

## Extras

## Safely Shutdown via Tactile Switch

Its a good idea to safely turn off your Pi with a good **sudo shutdown -h now** but that often means pulling out a keyboard or connecting to the console. With our kernel we added a cool module that will let you turn any GPIO into a power button. Since there's a couple of tactile switches right there on the front, lets turn one into a power button. Press once to properly turn off the pi, press again to start it up. Isn't that nice?

[Read Tutorial](https://learn.adafruit.com/adafruit-pitft-28-inch-resistive-touchscreen-display-raspberry-pi/extras)
# PiGRRL 2

## Troubleshooting RetroPie and retrogame

This page documents the most common pitfalls encountered when making retro gaming&nbsp;projects, offering&nbsp;some solutions and where to turn for further help.

There are some things we can fix and some we can’t…we’re not involved in RetroPie’s development, for example…but we’ll try to point you in the right direction.

Most of the following&nbsp;troubleshooting steps will require a&nbsp; **USB keyboard attached**. Some require a&nbsp; **network connection**.

# General&nbsp;Troubleshooting

**There’s a lightning bolt icon in the upper right part of the screen!**

- That icon means the Raspberry Pi isn’t receiving adequate power; most likely, you need a higher current power supply. Very occasionally this is caused by a flimsy USB cable with thin wires…try swapping out for something heftier.

# _retrogame_ Related Troubleshooting

**_retrogame_** is our software that converts GPIO button actions&nbsp;into keyboard events. **These are the problems we’re best equipped to fix.**

Some common things to check for any _retrogame_ installation:

- Confirm button/joystick wires go to the correct pins and to ground. A multimeter with a continuity beep function is helpful for testing.
- The retrogame configuration file ( **/boot/retrogame.cfg** )&nbsp;uses _Broadcom pin numbers_…these are **_not_** sequential along the GPIO header pins. [This site has a nice reference chart](https://pinout.xyz) (use the “BCM” numbers).
- Earlier versions of _retrogame_ didn’t use a configuration file…you had to edit and compile the source code. That’s just horrible. If you’re running an early version like that, this would be a good time to upgrade. See the [Installing Retrogame](../../../../retro-gaming-with-raspberry-pi/adding-controls-software) page.

### 

- Check connections and configuration file pin numbers as explained above. (If some controls are responding, that’s an encouraging start…it at least means the code is running.)
- The key codes generated by retrogame might not be assigned to EmulationStation’s keyboard inputs; one or the other will need to be changed. Either edit /boot/retrogame.cfg, or, from the EmulationStation main screen, press Start to access the main menu, then select “Configure Input” and proceed through each of the controls.

### 

- Confirm that retrogame is actually running…either exit to the command line (F4) or log in using ssh, then&nbsp;use “ps -ef | grep retrogame” to check. If you used our installer script or one of our ready-made SD card images, it should be started automatically on boot (added to /etc/rc.local).
- Confirm that the file “/etc/udev/rules.d/10-retrogame.rules” exists. Our installer script creates this file, but if you installed retrogame manually or from source, it may have been overlooked.

### 

Confirm that the file “/etc/udev/rules.d/10-retrogame.rules” exists. Our installer script creates this file, but if you installed retrogame manually or from source, it may have been overlooked.

### 

Unfortunately, yes. retrogame only works with “passive” switches between a GPIO pin and ground (logic low=pressed). It won’t work with switches that have the opposite logic level (high=pressed).

### 

This can happen if you’re running an early Raspberry Pi (Model A or B) with the 26-pin GPIO header and select the “Six buttons + joystick” option in the retrogame installer. That particular configuration is set up for our Arcade Pack and newer (40 pin) Raspberry Pi boards. Some of the pin numbers referenced&nbsp;_don’t exist_ on the older 26-pin header and lead to trouble.

If this happens to you, not to worry. Power off the Pi and insert the SD card in a reader on a PC or Mac. Look for a file called retrogame.cfg…edit this file and change the pin numbers to match your specific controller wiring.

# _RetroPie_ Related Troubleshooting

RetroPie provides the actual emulation software and a nice user interface. As this is third-party code, the “depth” of problems we can troubleshoot is more limited, but here are some of the common issues we’ve seen and how to resolve them…

### 

This can happen with certain&nbsp;emulators (usually older or more esoteric ones) that don’t use the _libretro_ library. Among other things, libretro allows the global controller configuration to be used everywhere. There are a couple of workarounds that _might_ help, but no guarantees…

- You can rummage around in&nbsp;/opt/retropie/configs and look for a configuration file specific to the problem&nbsp;emulator, then edit its keyboard layout to match your controls. The format of this file, if one even exists, is likely specific to that one emulator, so you’ll need to do some research (Google search, etc.), it’s not something we can help out with.
- You can try hunting&nbsp;for an alternate emulator based on libretro, if there’s one available (see “Installing RetroPie Packages” below).

### 

This can happen if the ROM file format changes between versions of an emulator, or if two emulators for the same system use different formats.

- Do some research (Google search, etc.) to see if this is the case. It’s possible there may be utilities to convert among different ROM formats.
- Try installing an alternate emulator, if there’s one available (see “Installing RetroPie Packages” below).

A few&nbsp;emulators may require a “BIOS file” in order to function, but it’s not included with the software for legal reasons. This is something you’ll have to research and track down.

## Installing RetroPie Packages
To add support for a system not present in RetroPie by default, or to add&nbsp;an alternate emulator program for an existing system, select “RetroPie Setup” from the RetroPie menu. **This brings up a text-menu-based interface and will require a USB keyboard to navigate.**

Select “Manage packages” and then one of the core, main, optional or experimental selections…you’ll probably want to navigate through each of them to see what’s available, keeping in mind that each successive category might be a little rougher around the edges.

**Your best bet are packages whose names begin with “lr-”.** This means they’re built using **libretro** and the control inputs should already work with what you have! Other packages may require their own manual controller setup, which can be a real nuisance.

When asked, select “ **Install from binary**.” The _source_ option takes _much_ longer and won’t provide any&nbsp;benefit for the average user…only attempt that if you _know_ you need absolutely bleeding-edge code.

It’s totally valid to install multiple emulator packages that handle the same type of system. Each might have different performance or compatibility benefits, so it’s worth testing your options. See “Accessing Alternate Emulators” below.

![gaming_setup1.png](https://cdn-learn.adafruit.com/assets/assets/000/039/992/medium640/gaming_setup1.png?1489035401)

![gaming_setup2.png](https://cdn-learn.adafruit.com/assets/assets/000/039/993/medium640/gaming_setup2.png?1489035467)

![gaming_setup3.png](https://cdn-learn.adafruit.com/assets/assets/000/039/994/medium640/gaming_setup3.png?1489035472)

![gaming_setup4.png](https://cdn-learn.adafruit.com/assets/assets/000/039/995/medium640/gaming_setup4.png?1489035479)

![gaming_setup5.png](https://cdn-learn.adafruit.com/assets/assets/000/039/996/medium640/gaming_setup5.png?1489035485)

## Accessing Alternate Emulators
When you launch a game, you’ll briefly see this nondescript launching message. **You have a couple of seconds to hit a button or key…**

The first option in this configuration menu lets you select a different emulator package for a given system type…or even on an individual ROM-by-ROM basis, if different games benefit from different emulation software.

Test it out with. If you don’t like the results, next time you launch that game you can access the configuration menu again and restore the original selection.

![gaming_config1.png](https://cdn-learn.adafruit.com/assets/assets/000/039/990/medium640/gaming_config1.png?1489035260)

![gaming_menu1.png](https://cdn-learn.adafruit.com/assets/assets/000/039/991/medium640/gaming_menu1.png?1489035287)

## More RetroPie Help

For issues not covered above, the best sources for RetroPie-specific help are the official&nbsp;documentation and forum on the RetroPie web site:

**[RetroPie Documentation](https://retropie.org.uk/docs/)**

**[RetroPie Forum](https://retropie.org.uk/forum/)**


## Featured Products

### Raspberry Pi 3 - Model B - ARMv8 with 1G RAM

[Raspberry Pi 3 - Model B - ARMv8 with 1G RAM](https://www.adafruit.com/product/3055)
Did you really think the Raspberry Pi would stop getting better? At this point, we sound like a broken record, extolling on the new Pi’s myriad improvements like we’re surprised that the folks at the Raspberry Pi Foundation are continuously making their flagship board better.&nbsp;...

In Stock
[Buy Now](https://www.adafruit.com/product/3055)
[Related Guides to the Product](https://learn.adafruit.com/products/3055/guides)
### Raspberry Pi 2 - Model B v1.2 - ARM Cortex-A53 with 1G RAM

[Raspberry Pi 2 - Model B v1.2 - ARM Cortex-A53 with 1G RAM](https://www.adafruit.com/product/2358)
Didn't think the Raspberry Pi could get any better? You're in for a big surprise! The Raspberry Pi 2 Model B is out and it's amazing! With an upgraded ARM Cortex-A53&nbsp;quad-core processor, Dual Core VideoCore IV Multimedia coprocessor, and a full Gigabyte of RAM, this...

No Longer Stocked
[Buy Now](https://www.adafruit.com/product/2358)
[Related Guides to the Product](https://learn.adafruit.com/products/2358/guides)
### PiGRRL 2.0 Kit Pack - Build your own Pi Game Emulator!

[PiGRRL 2.0 Kit Pack - Build your own Pi Game Emulator!](https://www.adafruit.com/product/3014)
For all those who feared their Game Boy days would be but a memory, worry no more!&nbsp;The Game Boy may be dead, but with this pack&nbsp;you'll have a chance to revive it. We've collected all the right&nbsp;parts so you can assemble the guts of your very own DIY GameGRRL - a portable...

Out of Stock
[Buy Now](https://www.adafruit.com/product/3014)
[Related Guides to the Product](https://learn.adafruit.com/products/3014/guides)
### PiGRRL 2.0 Custom Gamepad PCB

[PiGRRL 2.0 Custom Gamepad PCB](https://www.adafruit.com/product/3015)
**This is the Custom Gamepad PCB for the [PiGRRL 2 pack](https://www.adafruit.com/products/3014)!** The board is designed for use in portable gaming projects like the PiGRRL 2 but it's basically everything-you-need to make your very own DIY gaming project with GPIO...

In Stock
[Buy Now](https://www.adafruit.com/product/3015)
[Related Guides to the Product](https://learn.adafruit.com/products/3015/guides)
### PiTFT Plus Assembled 320x240 2.8" TFT + Resistive Touchscreen

[PiTFT Plus Assembled 320x240 2.8" TFT + Resistive Touchscreen](https://www.adafruit.com/product/2298)
Is this not the cutest little display for the Raspberry Pi? It features a 2.8" display with 320x240 16-bit color pixels and a resistive&nbsp;touch overlay. The plate uses the high speed SPI interface on the Pi and can use the mini display as a console, X window port, displaying images or...

Out of Stock
[Buy Now](https://www.adafruit.com/product/2298)
[Related Guides to the Product](https://learn.adafruit.com/products/2298/guides)
### PowerBoost 1000 Charger - Rechargeable 5V Lipo USB Boost @ 1A

[PowerBoost 1000 Charger - Rechargeable 5V Lipo USB Boost @ 1A](https://www.adafruit.com/product/2465)
PowerBoost 1000C is the perfect power supply for your portable project!&nbsp; **With a built-in load-sharing battery charger circuit, you'll be able to keep your power-hungry project running even while recharging the battery!** &nbsp;This little DC/DC boost converter module can...

In Stock
[Buy Now](https://www.adafruit.com/product/2465)
[Related Guides to the Product](https://learn.adafruit.com/products/2465/guides)
### Lithium Ion Polymer Battery - 3.7v 2500mAh

[Lithium Ion Polymer Battery - 3.7v 2500mAh](https://www.adafruit.com/product/328)
Lithium-ion polymer (also known as 'lipo' or 'lipoly') batteries are thin, light, and powerful. The output ranges from 4.2V when completely charged to 3.7V. This battery has a capacity of **2500mAh** for a total of about 10 Wh. If you need a smaller battery, <a...></a...>

In Stock
[Buy Now](https://www.adafruit.com/product/328)
[Related Guides to the Product](https://learn.adafruit.com/products/328/guides)
### Adafruit Mono 2.5W Class D Audio Amplifier - PAM8302

[Adafruit Mono 2.5W Class D Audio Amplifier - PAM8302](https://www.adafruit.com/product/2130)
This super small mono amplifier is surprisingly powerful - able to deliver up to 2.5 Watts into 4-8 ohm impedance speakers. Inside the miniature chip is a class D controller, able to run from 2.0V-5.5VDC. Since the amp is a class D, its very efficient (over 90% efficient when driving an...

In Stock
[Buy Now](https://www.adafruit.com/product/2130)
[Related Guides to the Product](https://learn.adafruit.com/products/2130/guides)

## Related Guides

- [Adafruit Powerboost 1000C](https://learn.adafruit.com/adafruit-powerboost-1000c-load-share-usb-charge-boost.md)
- [Adafruit PAM8302 - Mono 2.5W Class D Audio Amplifier](https://learn.adafruit.com/adafruit-pam8302-mono-2-5w-class-d-audio-amplifier.md)
- [Ray Gun Blaster](https://learn.adafruit.com/ray-gun-blaster.md)
- [Overwatch Prop Gun: Lucio's Blaster Pt. 1](https://learn.adafruit.com/overwatch-lucio-gun-pt1.md)
- [RasPipe: A Raspberry Pi Pipeline Viewer, Part 2](https://learn.adafruit.com/raspipe-a-raspberry-pi-pipeline-viewer-part-2.md)
- [Circuit Playground Sound-Controlled Robot](https://learn.adafruit.com/circuit-playground-sound-controlled-robot.md)
- [Energy Budgets](https://learn.adafruit.com/energy-budgets.md)
- [Monitor PiCam and temperature on a PiTFT via adafruit.io](https://learn.adafruit.com/monitor-picam-and-temperature-on-a-pitft-via-adafruit-dot-io.md)
- [Mini Raspberry Pi Handheld Notebook](https://learn.adafruit.com/mini-raspberry-pi-handheld-notebook-palmtop.md)
- [Raspberry Pi LED Matrix Sand Toy](https://learn.adafruit.com/matrix-led-sand.md)
- [Running OpenGL-based Games & Emulators on Adafruit PiTFT Displays](https://learn.adafruit.com/running-opengl-based-games-and-emulators-on-adafruit-pitft-displays.md)
- [10" Raspberry Pi Desktop](https://learn.adafruit.com/10-raspberry-pi-desktop.md)
- [Raspberry Pi Selfie Bot](https://learn.adafruit.com/raspberry-pi-selfie-bot.md)
- [CRICKIT WobblyBot](https://learn.adafruit.com/crickit-wobblybot.md)
- [Portable 5in Monitor with HDMI](https://learn.adafruit.com/portable-5in-monitor-with-hdmi.md)
- [CircuitPython Sound Box](https://learn.adafruit.com/circuitpython-sound-box.md)
- [Adafruit PiTFT - 2.8" Touchscreen Display for Raspberry Pi](https://learn.adafruit.com/adafruit-pitft-28-inch-resistive-touchscreen-display-raspberry-pi.md)
