Chapter 17

Putting the Raspberry Pi in Control

In This Chapter

arrow Discovering how to output logic signals

arrow Learning how to drive an LED

arrow Creating the Copycat game

arrow Customizing the Copycat game

arrow Creating the deluxe Copycat game

In Chapter 16, we cover GPIO signals on the Raspberry Pi and show 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 17-15 at the end of this chapter.)

The GPIO lines are limited in the power that they can output, so to control things that require ...

Get Raspberry Pi For Dummies, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.