LED is dim (pinMode missing)

  • LED
  • Arduino

Why it happens

  • pinMode(pin, OUTPUT) is missing, so HIGH only switches on the weak pull-up.
  • The resistor is 10 kΩ instead of 220 Ω.

How to fix it

  1. Add pinMode(pin, OUTPUT); in setup().
  2. Read the resistor's colours: 220 Ω is red, red, brown.

It worked if: The LED is as bright as on 5V.

From the official documentation. Arduino's digital pins page describes this exact case. Sources: Arduino: digital pins.

Didn't help? Search another error or ask us.