0

I'm fairly new to RPI and I'm looking for a way to check if my GPIO pins are faulty, I've tried pigpio test but it failed all my pins and I've seen that this test isn't viable for RPI 4. Later on I've tried to change status of pins by:

gpio mode <pin> output
gpio write <pin> 1

and it did power up my fan (some of pins could only do a little tick of movement and got blocked, but it's a 5V fan, so I guess it is normal)

I don't know if the fact that when I manually switch gpio pins they work means that they are okay, because I don't know if there's a different "thing" the gpio pins are supposed to do.

Is there a way to test every pin on RPI4 then? I've tested manually like 5, because it was really tedious and all of them reacted the way I described before. If not, should I check anything other than powering up something with them?

6
  • 1
    What version of pigpiod are you using? 'pigpiod -v' Connecting a fan to a GPIO pin could draw too much current cause damage. You should use an led and resistor.
    – CoderMike
    Mar 10, 2021 at 12:41
  • pigpiod -v returned 71, and thank you for the tip with current draw Mar 10, 2021 at 13:17
  • 1
    You need to upgrade your version of pigpio (currently 79). V71 predates the Pi4B.
    – joan
    Mar 10, 2021 at 13:18
  • how to upgrade it? I've tried to download it now from the official site again but it is still 71, sorry for stupid question but can't figure it out yet Mar 10, 2021 at 13:23
  • 1
    thank you, purging old and installing again helped, now test shows no issues, thank you Mar 10, 2021 at 18:06

1 Answer 1

-1

No, there's no such possibility to automatically test pins, since that requires that you have appropriate hardware attached. Since every pin can be input and output, you would need to have an LED and a button attached to all pins (or have them shorted pairwise). And then most pins also have some further functions, which can only be tested using specific hardware.

Since this requires quite a bit of hardware and interferes with whatever hardware you have for your own project, a test program must be written for a specific hardware setup.

6
  • So if that pigpio test for example says failure on pin 4 and when I checked pin 4 if it can run a fan it did, then the pin is fine and the test is faulty? Mar 10, 2021 at 12:29
  • Can you tell me what test exactly you mean? I assume they need some prerequisites, too.
    – PMF
    Mar 10, 2021 at 12:31
  • I simply ran pigpiod and then ./pigpiotest and it said that every pin failed so I don't know if that test doesn't support RPI4 or it's something more than powering up a fan or a diode with a pin Mar 10, 2021 at 12:34
  • I cannot find any documentation on that utility or what it is supposed to do, maybe it's just the unit test library. And the fact that every pin is failing is a strong indication that the problem is with the test, not the actual pins.
    – PMF
    Mar 10, 2021 at 12:40
  • Pins can be tested with software eg pigpio & gpiotest youtube.com/watch?v=sCJFLKWaxHo
    – CoderMike
    Mar 10, 2021 at 18:51

Your Answer

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

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