What You See
You have an LED wired up on your breadboard, you uploaded your code, and the LED is completely off. No glow, no flicker, nothing. Or maybe it was working earlier and now it refuses to light up.
This is the single most common problem in Arduino projects. The good news is that there are only a handful of things that can cause it, and you can check them all in about two minutes.
Most Likely Causes
Here they are, roughly in order from "almost certainly this" to "less common but possible."
1. The LED Is Backwards
This is the number one cause. LEDs are polarized, which means they only work in one direction. Current flows from the anode (positive, longer leg) through the LED to the cathode (negative, shorter leg). If you put it in backwards, no current flows and nothing lights up. The LED is not damaged by this, it just will not work.
How to tell which leg is which:
- The longer leg is the anode (+). It connects to the pin or to 5V (through a resistor).
- The shorter leg is the cathode (-). It connects to GND.
- If the legs have been trimmed and you cannot tell which is longer, look at the flat edge on the bottom rim of the LED housing. The flat side is the cathode (-).
Fix: Pull the LED out, flip it around, and push it back in.
2. Missing or Burnt-Out Resistor
Every LED needs a current-limiting resistor (usually 220 ohm or 330 ohm). If there is no resistor in the circuit, one of two things happened:
- You forgot the resistor entirely. Without it, too much current flows through the LED the instant you power it on. The LED may have burned out in a fraction of a second, so fast you never even saw it light up.
- The resistor is in the wrong place. It needs to be in series with the LED, meaning current must flow through the resistor to get to the LED. If the resistor is on a different row of the breadboard, it is not actually connected to anything.
Fix: Check that you have a resistor (220 ohm is the safe default) and that it is in the same electrical path as the LED. One leg of the resistor should share a breadboard row with one leg of the LED.
3. Wrong Pin Number in Code
Your code says digitalWrite(13, HIGH) but your LED is wired to pin 10. Or you meant pin 7 but typed pin 8. This is easy to do, especially when you are rewiring things.
Fix: Look at the physical wire going from the breadboard to the Arduino. Which pin number is it plugged into? Now look at your code. Do the numbers match? If not, change either the wire or the code.
4. Pin Not Set as OUTPUT
If you forget to call pinMode(pin, OUTPUT) in your setup() function, the pin defaults to INPUT mode. In INPUT mode, the pin has very high impedance and can only source a tiny amount of current. The LED might glow extremely faintly, or not at all.
Fix: Make sure your setup() function includes pinMode(yourPin, OUTPUT); for the pin your LED is on.
5. LED Is in the Wrong Breadboard Row
Breadboard rows are connected horizontally in groups of 5 holes (on each side of the center channel). If your LED leg is in row 10 but your wire is in row 11, they are not electrically connected. They look close together, but one row off means no connection.
Fix: Double check that the wire from the Arduino pin and the LED leg (or the resistor leg) are in the exact same row. Count the holes if you have to.
6. Components Straddling the Center Channel Wrong
The center channel of the breadboard splits the left and right halves. Each half has its own set of connected rows. If both legs of the LED are on the same side of the channel (same half), they are probably in different rows, which is correct. But if you meant to bridge the channel and missed, one leg is floating.
Fix: If you are bridging the center channel, make sure each leg is firmly in a hole on each side.
7. Using Analog Pin Labels for Digital Output
If you see "A0" through "A5" on your Arduino, those are the analog input pins. You can actually use them as digital outputs, but you have to refer to them correctly. On most Arduino boards, A0 is digital pin 14, A1 is 15, and so on. If your code says pinMode(0, OUTPUT) but your wire is on A0, you are controlling digital pin 0 (which is the serial RX pin), not A0.
Fix: Use the A0, A1, etc. constants directly in your code: pinMode(A0, OUTPUT); and digitalWrite(A0, HIGH);. Arduino's built-in constants handle the mapping for you.
8. Dead LED
LEDs can die. If you accidentally ran one without a resistor, even briefly, it may be burnt out. If you have been reusing the same LED for weeks of experiments, it might have taken enough abuse to fail.
Fix: Swap in a fresh LED. If the new one lights up, the old one was dead.
9. Loose Connection
A jumper wire that is not fully pushed into the breadboard hole, a wire that has been bent too many times, or a breadboard with worn-out contacts can all cause open circuits.
Fix: Push all connections in firmly. Try wiggling wires gently. If the LED flickers when you touch a wire, that connection is bad. Replace the wire.
Test Code to Verify Your Fix
Upload this sketch. It blinks the built-in LED on pin 13 and also blinks whatever pin you specify. If the built-in LED blinks but your external LED does not, the problem is in your wiring. If neither blinks, the problem might be your upload or board.
const int MY_LED_PIN = 10; // Change this to your LED's actual pin
void setup() {
pinMode(LED_BUILTIN, OUTPUT); // Built-in LED (pin 13 on most boards)
pinMode(MY_LED_PIN, OUTPUT); // Your external LED
Serial.begin(9600);
Serial.println("LED test starting...");
}
void loop() {
digitalWrite(LED_BUILTIN, HIGH);
digitalWrite(MY_LED_PIN, HIGH);
Serial.println("ON");
delay(1000);
digitalWrite(LED_BUILTIN, LOW);
digitalWrite(MY_LED_PIN, LOW);
Serial.println("OFF");
delay(1000);
}
Open the Serial Monitor at 9600 baud. You should see "ON" and "OFF" alternating every second. If you see the serial output but the LED is dark, you know the code is running and the problem is 100% in the wiring or the LED itself.
Still Not Working?
Try the absolute simplest possible circuit: one LED, one 220 ohm resistor, from pin 13 to GND. Use the Blink example that comes with the Arduino IDE (File > Examples > 01.Basics > Blink). If that does not work, you may have a board issue or a USB cable that cannot carry data. See the "Upload Failed or Port Not Found" article.