LED not lighting up no matter what

Hi,

When I was using LEDs on a project today, I could not get one to light up no matter what. I've attached an image of what my wiring looks like but essentially the shorter end of the LED is connected to ground, and the longer end is connected to a 330ohm resistor, which is then connected to digital pin 13. I'm simply trying to get it to light up at this point, but nothing is working.
I've tried swapping LEDs, resistors, breadboards, the pin its connected to, and also connecting directly to the 5V power pin instead of the digital pin, yet the LED still doesn't light up. It's also worth noting that the "L" LED on my Arduino Uno (which is connected to pin 13) is lighting up in accordance to the blinking sequence, so I doubt its a problem with the code itself.
What else can I be doing wrong here?

Here is what my wiring looks like:

And my code:

#define led 13

void setup() {
  // put your setup code here, to run once:
  pinMode(led, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
  digitalWrite(led, HIGH);
  delay(500);
  digitalWrite(led, LOW);
  delay(500);
}

I've used this exact code for blinking an LED before and that had worked perfectly...

The breadboard is broken
The resistor is broken
The resistor is too large
The led is broken
Your wires are doing something funny off camera
Your wires are broken
A contact is poor

Have you got a multimeter?

Choose other pin number, pin 13 is used for on-board led. If you connect two different leds (for example with different colors) to the same pin - perhaps only one will be light.

I'll test the wires and see if it works

I've tried multiple pins but the result seems to be all the same

Alright after some more testing, I've figured out that it appears one of the wires is just broken--replaced it with some new ones and everything is working now, thanks!

on the picture it is connected to 12

It is a UNO - that is irrelevant! :grin:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.