For the purposes of this guide, we will use an LED light so that we can control it using the Raspberry Pi as a Light Switch to directly control our light.
Step 1: Connect the LED positive wire (the longer of the two wires) from resistor to a GPIO pin. In this example, GPIO 17.
Step 2: Connect the LED ground wire (the shorter of the two wires) to the GND pin from the Pi Cobbler