Chapter 5. Port Input and Output on the Raspberry Pi

Digital input and output (I/O) is at the point where computer programming touches the real world. The Raspberry Pi has a rich I/O structure that includes 3.3 Volts, input and output interface ports, Serial Peripheral Interface (SPI), and Inter-Integrated Circuit (I2C). Using this I/O structure, you will drive LEDs as output indicators and then use the Tkinter interface to sense switches as input.

After completing this chapter, you will be able to:

  • Understand the Raspberry Pi digital I/O port configuration
  • Drive LEDs and sense actuation of switches
  • Add a switch interface to the Internet radio project

Understanding Raspberry Pi digital input and output ports

The Broadcom SOC (BCM2835 and BCM2836 in ...

Get Raspberry Pi Essentials 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.