I would like to learn how to remap the GPIOs on the Raspberry Pi Zero.

How to make Physical Pin 11 to act like something else ?

  • 1
    I don't know what you mean. Could you explain what a CON is? Perhaps by summarising and giving a link to where you read about it. – joan Aug 13 '19 at 10:26
  • I believe CON stands for connector. I have found mentions of these on the Banana Pi wiki: wiki.banana-pi.org/Banana_Pi_BPI-M3#GPIO_PIN_define . As you can see there are 3 different pins definition for each CON I've also edited the question to reflect more the issue I am interested it. – bleah1 Aug 13 '19 at 11:21
  • I guess you are talking about Orange Pi and Banana Pi GPIO connectors/configuration CON1, CON2. Rpi has only one 26/40 pin GPIO connector or header. But Rpi do have alternative functions for GPIO pins, sort of different "configurations", and also three or four numbering "conventions". Rpi by itself is already very confusing, and will explode if mixed with Oranges and Bananas. – tlfong01 Aug 13 '19 at 11:28

The GPIO (General Purpose Input Output) may be set in a variety of modes. Potentially each Pi GPIO may be set into 8 different modes called INPUT, OUPUT, ALT0, ALT1, ALT2, ALT3, ALT4, and ALT5.

All GPIO may be set in INPUT or OUTPUT modes. The other potential modes depend on the GPIO and are summarised on page 102 of BCM2835 ARM Peripherals.

Several of the GPIO libraries let you set the mode of a GPIO. In particular wiringPi's gpio utility and (my) pigpio's pigs utility.

pigs mode setting command.

The Pi4B has some altered ALT functions which are summarised here.

The preferred way to manipulate the modes is probably to use device tree settings in /boot/config.txt (e.g. to set up a UART, SPI, etc.).

See /boot/overlays/README for up to date information.

  • That chart is also reproduced online: elinux.org/RPi_BCM2835_GPIOs. – goldilocks Aug 13 '19 at 11:37
  • @goldilocks that remined me about the Pi4B. – joan Aug 13 '19 at 11:38
  • What do I look for in /boot/config.txt ? How does a pin definition look like ? What is the pin actual name ? pinout.xyz/pinout/pin11_gpio17 This one is Psychical Pin 11, but GPIO 17 and not to mention its other 5 alts. – bleah1 Aug 13 '19 at 12:03
  • I suggest you start by looking at the documentation on the raspberrypi.org site and then come back with a more targetted question. – joan Aug 13 '19 at 12:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.