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...
