I'm working with a Raspberry Pi Zero 2 W running Linux raspberrypi 5.15.61-v7+.

Is this a reliable way to establish that I have a non functional GPIO 15?

First, I establish that my test mechanism works by using GPIO 14 to light up an LED that is attached to my breadboard.

$ raspi-gpio set 14 op pn dh # Light turns on 
$ raspi-gpio set 14 op pn dl # Light turns off
$ raspi-gpio set 14 op pn dh # Light turns on
$ raspi-gpio get 14
GPIO 14: level=1 fsel=1 func=OUTPUT

Next, I then try GPIO 15.

raspi-gpio set 15 op pn dh # No light
raspi-gpio set 15 op pn dl # No light
raspi-gpio set 15 op pn dh # No light
raspi-gpio get 15
GPIO 15: level=1 fsel=1 func=OUTPUT

To complete the cycle of testing, I move onto GPIO 18.

$ raspi-gpio set 18 op pn dh # Light on
$ raspi-gpio set 18 op pn dl # Light off
$ raspi-gpio set 18 op pn dh # Light on
$ raspi-gpio get 18
GPIO 18: level=1 fsel=1 func=OUTPUT

Is my test flawed in some way?

  • 1
    Looks like it is broken.
    – Milliways
    Nov 14, 2022 at 2:14

2 Answers 2


WiringPi used its own eclectic numbering system.
Whatever its justification in 2013 it is best practice to use BCM numbering.

You can set TxD HIGH with

raspi-gpio set 14 op pn dh

and LOW with

raspi-gpio set 14 op pn dl

NO need for any libraries or programs with Raspberry Pi OS using the inbuilt raspi-gpio utility.

raspi-gpio help will show documentation for this utility. e.g.
raspi-gpio get will show state of all pins (and has the advantage for showing ACTUAL pin function rather than the static default.

NOTE you may be interested in GPIOreadall which is a Python program which reformats the raspi-gpio output into a format similar to GPIO readall.

  • Thanks for the clarification on the correct nomenclature and just using the command line. So with the command line, I can successfully light an LED with BCM pin 14. But not pin 15. Which makes me think that for my zero 2 w pi - pin 15 is kaput. Nov 14, 2022 at 0:44
  • This is not a definitive test. If you have configured serial then GPIO15 would be set as RxD i.e. INPUT. I am unsure if raspi-gpio would override this. To test you would need to disable serial.
    – Milliways
    Nov 14, 2022 at 1:13
  • DO NOT put details in Comments. Edit your Question. raspi-gpio is a far more reliable indicator of pin state than GPIO readall
    – Milliways
    Nov 14, 2022 at 1:24

Check the GPIO with pigpio's gpiotest.


  • Right, I forgot to include my results from that test. All pins pass. Still I'm left with the question of - is it reasonable of me to expect my little program to light up GPIO 15 (wPi 16) as I have with all the other GPIO pins that I've tested? Nov 13, 2022 at 20:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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