From the course: Raspberry Pi Essential Training

Unlock this course with a free trial

Join today to access over 22,800 courses taught by industry experts.

The first GPIO project

The first GPIO project

- [Instructor] In this chapter, let's dive right in to the Raspberry Pi GPIO and create the simplest of all projects, an LED controlled by a button. This project will require a basic Raspberry Pi setup, a breadboard and jumper wires, a push button, a 260 ohm resistor, and an LED. First, remove power from the Raspberry Pi. Never connect electronics to a Raspberry Pi when it's connected to power. Gather up your parts and clear a space on your desk. Place the breadboard next to the Raspberry Pi. Use a female to male jumper wire to connect from board pin six of the Raspberry PI to the blue ground rail of the breadboard. Select an LED. Do you notice how one leg is longer than the other? The long side is the anode. The short side is the cathode. Push the LED into two sockets in the breadboard, parallel to the power rail. Run a male to male jumper wire from the cathode, or short leg of the LED, to the ground rail. It's a good idea to use a black wire to indicate that this is a ground…

Contents