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

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