digital pin problem

Hi, i have problem with one of my digital pins:

On the pin 12, the led isn’t bright like on the other pins. I have tried to change leds, resistor etc. but nothing worked.
(btw, i’m a begginer with arduino generaly)

Here is the video of what i mean:

And here is the program i used if anybody wants to know:

long rnd;

void setup () {

for(int i=8;i<=11;i++) {

  • pinMode(i,OUTPUT);*

  • }*
    void loop () {

  • rnd = random(8,13);*

  • digitalWrite(rnd,HIGH);*

  • delay(200);*

  • digitalWrite(rnd,LOW);*


n the pin 12, the led isn't bright

Because it's an input?

Please use code tags, not italics, when posting code.

Yea i was looking the program over and over and i figured it out :slight_smile: Thank you anyway.

I should put 12 here instead of 11 for(int i=8;i<=11;i++)
but i tought that when i==11 it will do i++ and also set pin 12 as output.

As I said, i’m a begginer.

but i tought that when ... it will do ... and also set pin 12 as output.

When i is 11, it will be incremented to 12. 12 is not less than or equal to 11, so the body of the loop is not executed, and the increment operation is not performed again.