Chapter 16

Taking Control of Your Pi’s Circuitry

IN THIS CHAPTER

Bullet Learning what GPIO pins you can use

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

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

Bullet Building a working electronic dice display

Bullet Building a working model of a pedestrian crossing

Chapter 15 tells you all about what general purpose input/output (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 ...

Get Raspberry Pi For Dummies, 4th 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.