7

I am trying to test GPIO output on a Raspberry Pi, and I am wondering if it is broken.

These setups work:

  • 3v3 >> +LED terminal -LED terminal >> resistor >> GND (the LED is unusually dim here)
  • 3v3 >> resistor >> +LED terminal -LED terminal >> GPIO 7 (this one can toggle the LED through either my java program or the gpio command)

This setup does not:

  • GPIO 7 >> resistor >> +LED terminal -LED terminal >> GND (the LED stays constantly dim)

I would appreciate any help, Thanks.

3
  • Is the value of the resistor a secret? What kind of LED?
    – Milliways
    Commented Dec 16, 2014 at 22:04
  • @Milliways, the resister is a 220ohm resistor, and LED is a mystery LED. Although I do know that if I hook up the circuit to a non-PI 3v3 powersupply, it works. Commented Dec 18, 2014 at 16:35
  • 220Ω is OK for normal red LED, but many LEDS particularly some of the newer blue and white require close to 3V to work. You should measure the voltage across the LED.
    – Milliways
    Commented Dec 18, 2014 at 22:26

1 Answer 1

6

If you have wiringPi installed try its pin test utility with nothing connected to the gpios.

Alternatively download and install my pigpio library and run the gpio test shell script (again with nothing connected to the gpios).

A video of gpio test in action.

My gpio test checks each gpios input, output, pull-up, and pull-down.

4
  • I tried this, and everything reports OK. However, according to the WiringPi website, Pintest only tests inputs, not outputs. How can I test those? Should the broken setup even work? Commented Dec 16, 2014 at 17:13
  • My gpio test checks inputs and outputs as well as the pull-ups and pull-downs.
    – joan
    Commented Dec 16, 2014 at 17:23
  • Here is the relevant output, I assume this means that all is good?: Testing... Skipped non-user gpios: 0 1 5 6 12 13 16 19 20 21 26 Tested user gpios: 2 3 4 7 8 9 10 11 14 15 17 18 22 23 24 25 27 28 29 30 31 Failed user gpios: None Commented Dec 16, 2014 at 18:20
  • Yes, as far as testing without external hardware can determine. The gpios are operating properly.
    – joan
    Commented Dec 16, 2014 at 18:38

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.