Fritzing 40 pin raspberry pi header

broken image

The pin numbers then increase as we move down each column, with pin 1 going to pin 3, 5,7 etc until we reach pin 39. To the right of that pin is physical pin 2 which provides 5v power. Starting at the top left of the GPIO, and by that we mean the pin nearest to where the micro SD card is inserted, we have physical pin 1 which provides 3v3 power. GPIO pins have multiple names the first most obvious reference is their “physical” location on the GPIO. Both of these libraries come pre-installed with Raspberry Pi OS. In more recent times a new library called GPIO Zero has been introduced, offering an easier entry for those new to Python and basic electronics. The most common library is RPi.GPIO and it has been used to create thousands of projects since the early days of the Raspberry Pi.

broken image
broken image

Controlling a GPIO pin with Python is accomplished by first importing a library of pre-written code.

broken image