This guide describes how to build a wire harness to connect arcade buttons and joysticks to a Raspberry Pi.
- Arcade button kits for 2 players, containing buttons and joysticks
- Male-to-male jumper cables
- Male-to-female jumper wires
- 2 mini breadboard
- Electrical insulation tape
Let's start by wiring a "Sanwa-style" joystick with a 5-pin JST connector and two buttons. This is a typical setup for a player in MakeCode Arcade.
The idea of the harness is to use the mini breadboard as a centralized wiring point which can then be used to connect to the Raspberry Pi Zero. The mini breadboard allows to connect ground wires without having to strip and solder cables. Let's get started!
- Connect 5 male jumper wires into the 5-pin JST connector of the joystick.
- Use electrical tape to secure the cables.
- Identify the ground wire in the JST connector. Hold the joystick with the bottom facing you and the JST connector on the upper right, the ground wire is the upper wire.
- Connect the other 4 jumper wires to the other side of the breadboard. Make sure to place them each in their own row.
- Connect 2 jumper wires in to the 2-pin JST connector of a button.
- Use electrical tape to secure the cables.
- Connect one of jumper wires to the same row as the ground wire on the mini bread board.
- Connect the other jumper wire next to the 4 jumper wires, on its own row.
- Repeat steps 4 through 6 for the other button.
- Insert 6 male-to-female jumper wires in parallel to the logic wires.
- Insert 1 male-to-female jumper wire on the ground row.
- Use electrical tape around the two group of wires to secure them together.
That harness is ready! You can repeat the steps for player 2.
There are 3 "system buttons" in arcade: RESET
, RESTART
and MENU
. You can create a wire harness for those buttons and use the other side of the mini breadboard.
- Connect 2 jumper wires in to the 2-pin JST connector of a button.
- Use electrical tape to secure the cables.
- Connect one of jumper wire to the same row as the ground wire on the mini bread board.
- Connect the other jumper wire next to the 4 jumper wires, on its own row.
- Repeat step 1 for the two other buttons
- Use electrical tape around the two group of wires to secure them together.
It's ready!