O'Reilly logo

Raspberry Pi Essentials by Jack Creasey

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

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