What are GPIO pins on Raspberry Pi?
What is GPIO?
GPIO stands for General-Purpose Input/Output. GPIOs have no predefined purpose and are unused by default. If used, the purpose and behaviour of a GPIO are defined and implemented by the user. You can find the GPIO pins on the top of most Raspberry Pi models or other microcontrollers such as Arduino.
GPIO pins are mostly used for connecting electronics with computers/microcontrollers. These components can then be programmed to perform different tasks using different languages, such as C++, Python and Scratch. In this tutorials, we will focus on the GPIO pins on Raspberry Pi.
Numbering of GPIO pins
GPIO pins on Raspberry Pi have two numbering systems, Board and Boardcom (BCM). For example, the board pin 8
and BCM pin 14
are referring the same pin. Numbering is important based on which programming languages and libraries you use.
1. BCM numbering
BCM numbering matches up with the tiny labels printed on the Raspberry Pi, like GPIO14
. It is used in most programming languages such as Python and Scratch.
2. Board numbering
Board numbering is based on the physical locations of the pins on the Raspberry Pi. It starts from the top left corner as Pin 1
, left to right then next line, and the bottom right will be the last pin, Pin 40
. Board numbering is less common to be used, the only place you will see is probably in one or two Python libraries.
3. Functionalities of the Pins
Each pin on the pi has different functions and their physical locations may move from model to model. The pins without a BCM number are power output pins, such as GND
and 5VDC
. Pins with a BCM number are all PWM pins which can be used as input or output. Besides being a PWM pin, they also have other unique functions, such as GPIO 02
and GPIO 03
are also the pins of SDA
and SCL
for I²C communication. You can refer to the pinout of each model to find out more details of each pin.
Building Circuit with Raspberry Pi
UNPLUG your Pi when you are connecting electronics and DOUBLE CHECK your connections!Raspberry Pi is not short-circuit-proof as Arduino. If you have a short circuit or you give more power than it could take to the GPIO pins, it will break the Pi.
You will probably need a breadboard to make connections easier. In general, I will not suggest direct soldering on a Raspberry Pi, so it can be reused more easily. You can also use thea Bluetoothjumper withcable to extend all pins to a dongle type of mouse & keyboard.breadboard.