O'Reilly logo

Raspberry Pi For Dummies, 3rd Edition 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

Taking Control of Your Pi’s Circuitry

IN THIS CHAPTER

check Learning what GPIO pins you can use

check Seeing how you can control GPIO pins in Scratch and Python

check Making a GPIO pin flash an LED and read a push button

check Building a working electronic dice display

check Building a working model of a pedestrian crossing

Chapter 15 tells you all about what GPIO pins are, but in this chapter we want to describe how to access them physically and how to control them with software. We use both Scratch and Python to do this, but ultimately Python is the much more capable language for input/output control.

Accessing Raspberry Pi’s GPIO Pins

The GPIO pins are the key to enabling the Raspberry Pi to take control of any external circuit. They can be used as an output to switch on an LED or as an input to sense the state of an external push button. These connections into the computer, along with the fixed voltage power pins, are on a dual-row, 40-pin header plug. There are many ways to physically access ...

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