A powerful feature of the Raspberry Pi is the row of GPIO (general-purpose input/output) pins along the top edge of the board. A 40-pin GPIO header is found on all current Raspberry Pi boards.

You can find a schema with all pins:

Tools for GPIO on Raspberry Pi: Link to heading

  • Python library RPi.GPIO: sudo apt-get install python3-rpi.gpio or python-rpi.gpio
  • Python library gpiozero: sudo apt-get install python3-gpiozero or python-gpiozero
  • Console tool gpio: sudo apt-get install wiringpi