One powerful feature of the Raspberry Pi is the row of GPIO pins along the top edge of the board. GPIO stands for General-Purpose Input/Output. These pins are a physical interface between the Raspberry Pi and the outside world. At the simplest level, you can think of them as switches that you can turn on or off (input) or that the Pi can turn on or off (output).
The GPIO pins allow the Raspberry Pi to control and monitor the outside world by being connected to electronic circuits. The Pi is able to control LEDs, turning them on or off, run motors, and many other things. It’s also able to detect whether a switch has been pressed, the temperature, and light. We refer to this as physical computing.
There are 40 pins on the Raspberry Pi (26 pins on early models), and they provide various different functions.
We are using a T-cobbler to connect to the GPIO pins, which label the individual pins for you (see below)...
You’ll see pins labelled as 3V3, 5.0V, GND and #4, #5, #22, etc:
3V3 3.3 volts Anything connected to these pins will always get 3.3V of power
5.0V 5 volts Anything connected to these pins will always get 5V of power
GND ground Zero volts, used to complete a circuit
#4, #17, etc. GPIO pins 4, 17 , etc. General-purpose pins you can configured for input or output
Others Special purpose pins; Don't touch unless you know what you are doing
WARNING: If you follow the instructions, then playing about with the GPIO pins is safe and fun. Randomly plugging wires and power sources into your Pi, however, may destroy it, especially if using the 5.0V pins. Bad things can also happen if you try to connect things to your Pi that use a lot of power; LEDs are fine, motors are not.
3V3 single LED circuit (always connect back to ground(GND)!