Putting It All Together
To put the game together, make four of the boards, as shown in Figure 16-11, solder up the parts, and attach the LED on the copper strip side. You have to get the LED the right way round. On surface-mount LEDs, the cathode or negative end is normally marked by a thin green line or has a green arrow on the underside pointing to the cathode end. The cathode must be connected to the copper strip that has the current limiting resistor connected to it. You need a fine pair of tweezers to hold the LED in place when soldering it. Figure 16-12 shows a photograph of the LED soldered in place.
After you have made the board, solder four wires up and test it. Wire the +5V and ground up to a power supply or the appropriate points on the breakout board, and then take the control wire (the one connected to the base resistor) and touch it on the +5V line. The LED should light up. Do not worry if the LED glows dimly when this wire is not connected to anything. Just make sure that the LED is off when it is touched to the ground. Check the continuity of the switch to the ground when pressed either by using a meter or by using the GPIO port monitor program (Listing 15-1) or the GPIOmon.py on the web site.
Figure 16-11: Four switch module boards.
Figure 16-12: The LED on the ...