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.
Here’s a list of what you need for this chapter: