First LED Chaser and Curious Problem

I attempted to make an LED chaser with pins 1-7.

I have them switching with a for-loop, with the counter choosing the pin to light up.

for(count = 0; count<=7; count++){…

You get the idea.

Strangely a few of the pins seem rather weak! They barely light up the LED. So it appears to skip an LED in sequence.

I was wondering what might cause this? I’m still quite new to Arduino.

Don't use pins 0 & 1 there are fore the serial port. All the pins you do use must be declaired as outputs in setup using pinMode Use resistors with each LED.

Thanks. I was a little skeptical about those first two pins.

All the pins share a resister before they go to ground - no two are lit up at the same time.


All the pins share a resister before they go to ground

As long as no two are one that is fine. If more then one is on then the brightness will change the more are on.

Not to go off-topic, but where can I find a guide to all the pins of the microcontroller?

Is this the sort of thing you mean:-

You can use all 20 pins as outputs. However if you do not properly set the modes then what you describe might happen. Have a look at my basic sketches Maybe you did not set the modes properly?

If the pin isn't set up as an output, won't setting it high enable to 20k(I think) pullup resistor, severely limiting the current?

If the pin isn't set up as an output,

Then it is an input and has no output current at all. Turning on and off the 30K pull up resistor may look like an output but will only supply a maximum of 0.16mA into a dead short. Much less into a real load.

However as my experiments show 0.16mA is visible with efficient LEDs.