Setting up the input electronics

In this section, we will set up the input hardware to the arcade cabinet. The cabinet we will build comprises a joystick and seven push buttons. All of the devices used for this are simple digital logic devices that can be connected directly to the GPIO header on the Pi without external electronics.

Firstly, we will solder the connecting wires to each of our arcade buttons and joystick. The buttons used have three connections on them that are marked as COM, NC, and NO, which stand for common, normally closed, and normally open.

Note

The buttons and joystick that I have used are from a seller on eBay called ultracabs (http://www.ebay.co.uk/usr/ultracabs) who sells a variety of hardware for arcade cabinets. While any buttons and joysticks should work, I will be using these in the instructions.

In our case, we want to create a circuit when the button is pressed, so we need to solder wires to COM and NO. In this case, we will use female-to-female 0.1 inch jumper wires with one end removed and stripped, as this will allow easier connection to the pins on the Pi GPIO port, as shown in the following image:

Setting up the input electronics

Next, we need to solder the same connecting wires onto the joystick. For this, there are four similar switches to what were used on the buttons around the underside of the joystick assembly that needs to be connected.

Note that the particular joystick I recommend only has COM and NO connections, so since there are only two connections on the switch, getting the wires connected in the correct way is less important here.

Here, it is worth connecting the COM connections of each switch together with short pieces of standard wire, so that we only need a single common wire running to the joystick.

Next, as with the buttons, solder a 0.1 inch jumper wire to each switch contact and a single jumper wire to one of the common connections:

Setting up the input electronics

Once this is done, the electronics part of this project is pretty much complete. We will connect the buttons and joystick to the Pi later, once they are mounted on the cabinet.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.218.45.80