class="site">Protocol ExplorerGuidesDesigned to ScalePricing App
Protocol ExplorerGuidesLearn ArduinoPricing App

Arduino LED Not Lighting Up? Eight Checks in Order

Most Arduino LED faults come down to the same eight causes. Work through them in this order and you will usually find the problem within a few minutes, without rewriting your sketch.

By Protocol Explorer · Updated

Start with a known-good test sketch

Before moving wires, rule out the code. Upload this sketch, replacing 9 with the pin your LED is wired to. If the built-in L LED blinks but yours does not, the problem is in the circuit; if neither blinks, the sketch never reached the board.

const int LED_PIN = 9;   // the pin your LED is wired to

void setup() {
  pinMode(LED_PIN, OUTPUT);
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  digitalWrite(LED_PIN, HIGH);
  digitalWrite(LED_BUILTIN, HIGH);
  delay(500);
  digitalWrite(LED_PIN, LOW);
  digitalWrite(LED_BUILTIN, LOW);
  delay(500);
}

1. Did the upload actually finish?

Arduino IDE 2.x reports “Done uploading” when the sketch reaches the board. A compile that succeeds but an upload that fails is easy to miss. Check that the selected board is the Uno and that the selected port disappears when you unplug the USB cable. A charge-only cable will power the board without ever uploading.

2. Is the LED the right way round?

An LED only conducts in one direction. The longer leg is the anode and goes towards the Arduino pin, through the resistor. The shorter leg, on the side where the rim of the LED is flattened, is the cathode and goes to GND. Reversing it does no harm on 5 V; it simply stays dark.

3. Are the legs in different breadboard rows?

Each short row of five holes on a breadboard is one electrical connection. If both legs of the LED, or both ends of the resistor, sit in the same row, the part is shorted out and current bypasses it. Place parts so each leg lands in its own row, and remember the centre channel separates the two halves. On full-size breadboards the long power rails are often split in the middle.

4. Is the resistor 220 Ω, not 220 kΩ?

This is one of the most common mistakes in starter kits. A 220 Ω resistor has bands red, red, brown. A 220 kΩ resistor has bands red, red, yellow, and passes about a thousandth of the current, which is far too little to see. Check with a multimeter if the colours are hard to read.

For a red LED on 5 V, (5 V − 2 V) ÷ 220 Ω gives roughly 14 mA, which is bright and inside the Uno R3’s recommended 20 mA per pin. Blue and white LEDs drop around 3 V and will look dimmer with the same resistor.

5. Is pinMode() set to OUTPUT?

If you forget pinMode(pin, OUTPUT), the pin stays an input. Writing HIGH to an input turns on its internal pull-up resistor instead, which pushes a tiny current through the LED. The result is a faint glow that looks like a bad LED or a weak resistor. A dim LED is almost always this.

6. Does the pin in the code match the wire?

Count the pin header carefully; it is easy to land one hole over. Labels such as ~9 mean pin 9 with PWM, and A0–A5 are separate analog pins, not D0–D5. Avoid D0 and D1 for LEDs while you are learning, because they carry the USB serial link and flicker during uploads.

7. Does the circuit return to GND?

Current needs a full loop: from the pin, through the resistor and LED, back to a GND pin on the board. A wire to the breadboard’s blue rail does nothing unless that rail is also connected to GND. On an Uno R3 any of the GND pins will do.

8. Is the LED itself dead?

An LED connected directly to 5 V without a resistor can fail instantly. To test one, wire it from the 5 V pin through a 220 Ω resistor to GND, with no code involved. If it still does not light, swap it for a new one.

Practise the circuit before you wire it

Lesson 2 of Learn Arduino blinks an LED on a 3D Uno R3 and shows the current path as the sketch runs, so you can see what a correct loop looks like before you build it on a real breadboard. The first two lessons are free.

Official references

Related guides