O'Reilly logo

Jumpstarting the Raspberry Pi Zero W by Akkana Peck

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 2 Blink an LED

In the hardware world, the traditional first program most people write makes an LED blink. It’s simple, and who doesn’t like a light show?

The Raspberry Pi’s GPIO headers let you interface with all sorts of hardware. In this chapter, you’ll connect an LED to one of the GPIO pins and learn several ways of controlling it, turning it on and off and changing its brightness. You can even connect a pushbutton and modify what your LED does according to whether the button is pushed.

Hardware Requirements

Here’s a list of what you need for this chapter:

  • An LED
  • A small resistor. The exact value doesn’t matter; something around ...

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