Putting the Raspberry Pi in Control
In This Chapter
Discovering how to output logic signals
Learning how to drive an LED
Creating the Copycat game
Customizing the Copycat game
Creating the deluxe Copycat game
In the last chapter, we covered GPIO signals on the Raspberry Pi and showed how they could be used as inputs. We used those inputs to sense the position of a steel ball in our Blastoff game. In this chapter, we show you how to make these GPIO lines turn things on and off, to exercise control using the power of your computer and its program.
We do this first by showing you how to light up a light, specifically a light-emitting diode (LED). Then we show you how to combine this knowledge with the input techniques you learned in the last chapter to create a Copycat game. (If you just can’t wait to see what the final game will look like, flip to Figure 16-15 at the end of this chapter.)
The GPIO lines are limited in the power that they can output, so to control things ...