Everything Done correct, but only Pin 13 works

So before you ask, i have done every research and im helpless. I tried to do the BASIC blinking LED thing, but it only works on Pin 13. Ever other Pin wont respond.


My Code:

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

void loop() {
digitalWrite(7, HIGH);
delay(1000);
digitalWrite(7, LOW);
delay(1000);
}


And my resistor is at 330 ohms and my Board is: "Arduino Mega or Mega 2560".

With the Code and the Setup everything works if the Output-Pin is 13, but if its 7 for example, like my Code above, it wont work.

And i read every other poster that had this problem, but it seams like they have diffrent anwers.

Before yall Ask. The Setup is this: Pin 7 -> Breadboard->Resistor->LED(Long piller is positive)->negativ LED piller with Jumper to GND.

I also CHANGED EVERY Part, bredboard, LED, Resistor, Jumper and The board itself, three Times. And it only works for Pin 13...

How odd.

Write the sketch to blink both pin 7 and pin 13, just double up on the lines that handle pin 13..

Don't wire anything to pin 7.

See pin 13 LED blink. Move the wire from pin 13 to pin 7.

Report.

a7

You did not mention that you tested the LED and resistor separately to see if the LED works.

I tested it on 5V and it works

Welcome to the forum

What happens if you connect the LED and resistor directly across 5V and GND ? Does the LED light up ?

If you are using a breadboard and have power connected to the long stips down each side then are the colored lines associated with them continuous or do they have a break in them ? If they have a break and you are connecting power to one end and components to the other you need to bridge the gaps with jumpers

Change your delay to 5000 and try again.

Doesnt Work

When you tested it, you DID use a resistor, correct? Wiring a LED from 5V to GND with no resistor will work...ONCE...BRIEFLY(or not at all, if you have it backwards).

5V and GND works FINE, Pin 13 also and it does the Code, but not 1-12 nor 14-53

Works fine, did it like you said.

Please post a clear photo of your setup to test the LED on pin 7

Try your other Arduino board.

Sended it back. 80 Euro Kit . Two times the same problem as now.

My apologies if this sounds like an insult, but is the LED backwards maybe? If you connect the Red wire to the 5v pin, does the LED turn on?

No Problem Mate. Long Side is positive i know that. I did it correct. also 5v turns it on Perfect

No Problem Mate. Long Side is positive i know that. I did it correct. also 5v turns it on Perfect

From the "somebody has to ask the dumb question" department. When you changed the code to pin 13 to pin 7, you uploaded the updated code, not just verified it, correct?

i did update the Code and verified it and reseted the board

Well, I just pulled out a Mega, verified and uploaded your code, and as I expected, the LED blinked.

When you say it works on pin 13; is that the LED on the Mega that you see blinking, or the one in your breadboard? Or both?