Page 1 of 1

GPIO LED not Working

Posted: Wed Jul 11, 2018 5:19 pm
by thejasonballinger
Hi,

I am using a LED on my Raspberry Pi 3. I am trying to simply get it to toggle because it is not working properly. I have tried different pins and different resistance strengths, but I cannot get it to work at all. I believe it is a hardware issue so if anybody can help me with that that would be great. However, I want to give you my code in case it is a software issue.

Please keep in mind that I am on the latest version of Python 3 (Python 3.5.3).

Here is my code:

Code: Select all

from gpiozero import LED
from time import sleep

led = LED(26)
while True:
	led.toggle()
	sleep(1)
Please get back to me as soon as possible, I need this for a project that I am working on.

Thanks!

Re: GPIO LED not Working

Posted: Wed Jul 11, 2018 5:24 pm
by DirkS
Did you connect the LED the right way around?
Did you connect the LED to the correct pin? gpiozero uses BCM numbering by default, so GPIO26 is on physical pin 37 (see https://pinout.xyz/pinout/pin37_gpio26)

Re: GPIO LED not Working

Posted: Wed Jul 11, 2018 5:30 pm
by rpiMike
Post a photo of your wiring.

Re: GPIO LED not Working

Posted: Wed Jul 11, 2018 5:36 pm
by thejasonballinger
rpiMike wrote:
Wed Jul 11, 2018 5:30 pm
Post a photo of your wiring.
Here's a link to the pictures: [url]https://photos.app.goo.gl/FYD7qChhRnqPoMjy8[url]

Re: GPIO LED not Working

Posted: Wed Jul 11, 2018 5:37 pm
by thejasonballinger
thejasonballinger wrote:
Wed Jul 11, 2018 5:36 pm
rpiMike wrote:
Wed Jul 11, 2018 5:30 pm
Post a photo of your wiring.
Here's a link to the pictures: [url]https://photos.app.goo.gl/FYD7qChhRnqPoMjy8[url]
Oops, here: https://photos.app.goo.gl/FYD7qChhRnqPoMjy8

Re: GPIO LED not Working

Posted: Wed Jul 11, 2018 5:42 pm
by DirkS
thejasonballinger wrote:
Wed Jul 11, 2018 5:37 pm
thejasonballinger wrote:
Wed Jul 11, 2018 5:36 pm
rpiMike wrote:
Wed Jul 11, 2018 5:30 pm
Post a photo of your wiring.
Here's a link to the pictures: [url]https://photos.app.goo.gl/FYD7qChhRnqPoMjy8[url]
Oops, here: https://photos.app.goo.gl/FYD7qChhRnqPoMjy8
Blacking out most of the images doesn't make it any clearer...
Doesn't really seem to be any need to do that, I can see you have a Pitop anyway ;)

Re: GPIO LED not Working

Posted: Wed Jul 11, 2018 6:59 pm
by rpiMike
Can't tell from your photos how its wired. That led looks huge - what specification is it.

Re: GPIO LED not Working

Posted: Wed Jul 11, 2018 9:57 pm
by Z80 Refugee
thejasonballinger wrote:
Wed Jul 11, 2018 5:19 pm
I am using a LED on my Raspberry Pi 3. I am trying to simply get it to toggle because it is not working properly. I have tried different pins and different resistance strengths, but I cannot get it to work at all. I believe it is a hardware issue so if anybody can help me with that that would be great.
It's easy to find out whether the LED works: connect it (with resistor) between the 3.3V and 0V on the GPIO. It should then light up. If it doesn't light up, there is no way it will light up when you connect it to a GPIO output. Simples.

Beginners Guide to Wiring Things to the GPIO

Re: GPIO LED not Working

Posted: Thu Jul 12, 2018 4:39 pm
by thejasonballinger
ok. thank you for the link.

Re: GPIO LED not Working

Posted: Thu Jul 12, 2018 5:23 pm
by Z80 Refugee
rpiMike wrote:
Wed Jul 11, 2018 6:59 pm
Can't tell from your photos how its wired. That led looks huge - what specification is it.
It's just an ordinary LED in an 8 or 10mm package. Nothing to worry about (probably). The resistor might be 330 ohms, not too clear. Dunno how the switches are wired up though!