Modern Raspberry Pi's use a 40-pin header. The first generation of Pi's used a 26-pin header. This tutorial works with all of these versions using the same code and GPIO pins. We have provided wiring examples of both types using the same GPIO pins (#18 and #23).
When connecting the GPIO cable, make sure that you note the red or white wire on the ribbon, that's pin #1 of the cable. That end goes at the side closest to the SD Card and is labeled P1 on the Pi. The other side connects to the cobbler and can only be inserted one way due to the notch in the cable.
Place the cobbler onto the bread board straddling the center line. Connect the GND pin (ground) to the blue power rail on the side of the breadboard. You'll need two resistors (any values from 330 ohm up to 1000 ohm are fine).
Connect the first resistor to the cobbler row marked #18, and the other end to a row that isn't used by the cobbler.
Connect the second resistor to the cobbler row marked #23 and the other end to another empty row.
Now grab a red LED and a green LED. Look for the long pins on the LEDs; those are the positive (+) legs.
Connect the long (+) leg of the red LED to the resistor connected to #23 (GPIO #23), and the long leg of the green LED to the resistor connected to #18.
The short legs plug into the blue striped rail on the side of the breadboard.
The above images are for an original Pi Cobbler. For newer, 40-pin models like the A+/B+/Pi 2, you'll probably want to do something more like this, using wires to connect the resistors to the LEDs (click for a larger image):
That's it! You've just wired two LEDs with current-limiting resistors to the GPIO pins of the Pi.
Page last edited March 08, 2024
Text editor powered by tinymce.