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 ...
Get Jumpstarting the Raspberry Pi Zero W 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.