The Official Raspberry Pi Projects Book - Projects_Book_v4

(singke) #1

News


raspberrypi.org/magpi The Official Raspberry Pi Projects Book 159

X
Y A
B

LEFT SHOULDER RIGHT SHOULDER

D-PAD UP
D-PAD LEFT
D-PAD DOWN
D-PAD RIGHT

SELECT START

BUILD A HANDHELD GAMES CONSOLE Feature


or this project, we’re going to be using the
excellent RetroPie to power our emulation
software. You’ll first need to download
the image for RetroPie from its website here:
magpi.cc/25UDXzh. Write it to a microSD card and
pop it into your Pi Zero W. Connect that to a monitor
along with a keyboard, and we can get it ready.
You’ll first need to map some buttons – as the PCB
controller isn’t hooked up yet, we’ll have to quickly
use the keyboard for the initial setup. Make sure the
directional keys, Start, Select, A, and B are assigned
a key and just hold down the SPACE bar to skip
anything else. Once that’s done, connect to wireless
using the info in the ‘Setting up wireless’ boxout.
To get our final build working, we need to make
sure to install support for the PiTFT, as it’s not
supported natively. SSH into the Pi Zero W at
retropie.local or press F4 to enter the command
line on RetroPie, and enter the following:

cd
curl -O https://raw.githubusercontent.
com/adafruit/Raspberry-Pi-Installer-
Scripts/master/pitft-fbcp.sh
sudo bash pitft-fbcp.sh

Select PiGRRL 2 and don’t reboot. Now we need
to add support for the custom buttons. Back in the
command line, use:

cd
curl -O https://raw.githubusercontent.
com/adafruit/Raspberry-Pi-Installer-
Scripts/master/retrogame.sh
sudo bash retrogame.sh

Select PiGRRL 2 again and then reboot the system.
Once we’ve put all the parts together, and before
it’s assembled in the case, we’ll need to configure
the controls for the buttons we’ve made and added
to the project. Press the button assigned to Start
and select Configure Input, and then go through the
configuration process again.

F


Get your Pi Zero W ready to be made into a retro gaming treasure


PREPARING YOUR PI


Wireless connectivity on the new Pi Zero W is great, but the
configuration method for wireless LAN on the RetroPie is very
basic. You’ll need to know the name of your wireless network
(SSID) along with the password, as it won’t be able to search for
available networks. You can also import details by loading a .txt
file onto the boot partition.

SETTING UP WIRELESS


When you come back to reconfigure your buttons, refer to this handy guide

The configuration screen starts by asking
about your current controller setup
Free download pdf