# GPIO Pin Diagram

## Which Pin Numbering to Use?

The GPIO pin charts below are for the Raspberry Pi 3 Model B V1.2

You have a choice of two numbering systems in Python. Import the `RPi.GPIO` module:

```python
import RPi.GPIO as IO
IO.setmode(GPIO.BOARD)
```

Or:

```python
import RPi.GPIO as IO
IO.setmode(GPIO.BCM)
```

The `GPIO.BOARD` mode uses the numbers in the gray rectangles from 1 to 40.

The `GPIO.BCM` refers to the pins by the "Broadcom SOC channel" number.These are the numbers after the "GPIO" in the coloured rectangles. These numbers changed between model B versions of the Raspberry Pi.

It is safer if you use `GPIO.BOARD` numbers in your Python programs, especially if you have an older Raspberry Pi model.

For general input output circuits we suggest you only use the pins with the orange outline around the grey boxes.

### GPIO Diagram without Pi

![GPIO Diagram](https://3057147146-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ln8HCVcRiIinj6Fl0M2%2F-Ln8HCr6xSVzXy_Qzbzq%2F-Ln8HDCTFe2nDklzG-6O%2Fgpiopinsv2.svg?generation=1566745094144377\&alt=media)

### GPIO Diagram with Pi

![GPIO Diagram with Pi](https://3057147146-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-Ln8HCVcRiIinj6Fl0M2%2F-Ln8HCr6xSVzXy_Qzbzq%2F-Ln8HDCYhtI_MK7UDd7A%2Fpiplusgpiopinsv2.svg?generation=1566745094169511\&alt=media)
