O'Reilly logo

Raspberry Pi For Dummies by Mike Cook, Sean McManus

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 16

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 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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required