Orange Pi Zero GPIO Pins

The 26-pin expansion port of the Orange Pi Zero is placed on the opposite side of the board compared to Raspberry Pi while the pinout is exactly the same:

Orange Pi Zero Expansion Board Location vs Raspberry Pi

OSH Lab created a nice illustration of the Orange Pi Zero expansion port.

Orange Pi Zero GPIO Pins

It took me a while to discover that the General Purpose Input/Output (GPIO) numbering on the Orange Pi Zero with Armbian Legacy 3.4.113 is different from the Raspberry Pi and Raspbian. Here is how Allwinner SoC port names (such as PB12) are mapped to their GPIO pin numbers in the Linux kernel:

(Position of letter in alphabet - 1) * 32 + Pin number

For example, port PB12 would map to GPIO 44:

(2 - 1) * 32 + 12 = 44

Here is an online tool that does the GPIO mapping which I used when creating this illustration of the Orange Pi Zero GPIO pins:

Orange Pi Zero GPIO Pins

Orange Pi Zero GPIO Pins.

Using the GPIOs

Knowing the GPIO pin numbers is important for building all the Raspberry Pi based projects since their GPIOs are numbered differently (not sure how they do it, probably map to the datasheet?). In the follow-up post I show how to add an LCD monitor to the Orange Pi Zero via the SPI bus.

Use Contact Form 7 to collect business leads and enquiries? I created Storage for Contact Form 7 plugin which stores them safely in WordPress database.

Get it now for only $19 →


  1. Mark Birss says:

    Very nice, thank you for sharing

  2. fabien says:

    I had a hard time using my gpio’s on my orange pi zero.
    I use the functionality to control a little fan

Leave a Reply