An LED
A piece of wire for connecting the breadboard sections
Try It Yourself: Build the Pi Cobbler Circuit
Follow these steps to set up your Pi Cobbler to test the GPIO output:
Watch Out!: Working with Power
It’s always a good idea to wire your project with the Raspberry Pi turned off.
If the Raspberry Pi is turned on, the pins on the Pi Cobbler interface are live,
and can be accidentally shorted out!
- Connect one end of the Pi Cobbler ribbon cable to the GPIO interface and then
connect the other end to the Pi Cobbler breakout box. - Connect the Pi Cobbler breakout box on the breadboard, making sure the two rows
of pins straddle the middle of the breadboard so they don’t connect to each other. - Connect a wire from one of the GND pins on the Pi Cobbler to a common location
on the breadboard. (Most breadboards have two common rails that run the length of
the breadboard for the ground and power supply.) - Place the 1,000-ohm resistor in the breadboard path for the Pi Cobbler pin labeled
#18 and an empty area on the breadboard. (Pin #18 is the GPIO 18 signal pin.) - Place the LED so that the long lead connects to the 1,000-ohm resistor and the other
lead connects to the ground rail on the breadboard.
Figure 24.3 shows a diagram of what the circuit should look like when you’re finished
with these steps.
FIGURE 24.3 Pi Cobbler output circuit diagram.
With this circuit, when the GPIO 18 signal goes HIGH, the LED light ups, and when it goes LOW, the
LED goes out.