Only pin 13 is working

Hi,

I have some trouble with my arduino. I follow a simple tutorial to simply blink a led but my led only blink when I use the pin 13 and not the other pins.

void setup() {                
 // initialize the digital pin as an output.
 // Pin 13 has an LED connected on most Arduino boards:
 pinMode(13, OUTPUT);     
}

void loop() {
 digitalWrite(13, HIGH);   // set the LED on
 delay(1000);              // wait for a second
 digitalWrite(13, LOW);    // set the LED off
 delay(1000);              // wait for a second
}

Do you have an idea of why it doesn't work on the other pins?
Thanks

Please post the sketch that doesn't work.

(deleted)

Yes i am using a appropriate resistor for the led and I also change the number of the pin in the code. The code is always compiling but the led is never blinking when I don't use the pin number 13(I also change the connection on the board).

I'm still waiting for the code.

When you say the LED blinks when you use pin 13, do you mean that your external LED blinks, or only that the built-in LED on the Arduino board blinks?

here the code:

void setup() {
// initialize the digital pin as an output.
// Pin 13 has an LED connected on most Arduino boards:
pinMode(13, OUTPUT);
}

void loop() {
digitalWrite(13, HIGH); // set the LED on
delay(1000); // wait for a second
digitalWrite(13, LOW); // set the LED off
delay(1000); // wait for a second
}

I talking about a led on a breadboard

Please use code tags as you did in the opening post.

The code in reply #5 controls the led on pin 13. Where is the code that controls a led on another pin?

ok sorry, I use the same code that I use in my first post and I just change the pin number every time I use an another pin

Please just post the complete and actual code that you have run on your Arduino board and verified does not blink the LED.

It's not helpful to post the working code. You know that code works, we know that code works, so there's no point looking at it.

ok, so this code is compiling but the led is not blinking:

void setup() {                
 
 pinMode(3, OUTPUT);     
}

void loop() {
 digitalWrite(3, HIGH);   // set the LED on
 delay(1000);              // wait for a second
 digitalWrite(3, LOW);    // set the LED off
 delay(1000);              // wait for a second
}

So you have a led plus resistor connected to pin 3?

Which tools do you have at your disposal? Multimeter?

yes that right I have a led plus resistor connecter to pin 3.
I have no access to my school because of the virus so I have to access to multimeter or any other thing that can help me understand that can of signal I get from pin 3.

Does your external led work on pin 13?

This is to eliminate the chance that you accidentally reversed the led.

You are aware that some bread boards are divided in two sections and that the power rails are not connected between the one section and the other.

Yes the external led work when is connecter to the pin 13.

Yes I am aware that some bread boards are divided in two sections :wink:

Just for completeness' sake, what model of board is it?

Just to be clear ..

You need a 270 ohm resistor from pin 3 , that then connects to the led . The other side of the led is connected to Ov.
And .... you have tried turning the led around ?

If it still doesn’t work , the led maybe duff ? Does it light if you connect it to the 5v pin and Ov pin with the resistor in series ? If not the led is dead . If at some time you have connected the led directly to a power source without the resistor , then it will be dead .

I think that it's time for a clear picture of the setup; please size it to around 200 kB size.