Resetting Variable in for loop

I have a problem with my Code. I want to make a dynamic car blinker / indicator. The code needs to turn on the three lamps after the other one and then turning all lamps off and looping this process. In this code, the lamps go on after each other and go off but it doesnt loop so it just happens one time.

int led = 11;
int i = 1;

void setup() {
pinMode(11,OUTPUT);
pinMode(12,OUTPUT);
pinMode(13,OUTPUT);
}

void loop() {
for(i; i<4; i+1){
digitalWrite(led,HIGH);
delay(50);
led=led+1;
delay(100);
i=i+1;
}
digitalWrite(11,LOW);
digitalWrite(12,LOW);
digitalWrite(13,LOW);
}

Aufgabe7.3for.ino (337 Bytes)

for(i; i<4; i+1)Oops2

Please remember to use code tags when posting code

more clues C++ For Loop

i=i+1; at the end of for loop is the reason why your code does not work as expected.
You code can be rewritten as follows/

int led = 11;
int i = 1;

void setup() {
  pinMode(11, OUTPUT);
  pinMode(12, OUTPUT);
  pinMode(13, OUTPUT);
}

void loop() {
  for (i = 0; i < 4; i++) {
    digitalWrite(led + i, HIGH);
    delay(150);
  }
  digitalWrite(11, LOW);
  digitalWrite(12, LOW);
  digitalWrite(13, LOW);
}

See Arduino - for loop References

  for (i = 0; i < 4; i + 1) {

Oops

See Arduino - for loop Reference

TheMemberFormerlyKnownAsAWOL:

  for (i = 0; i < 4; i + 1) {

Oops

See Arduino - for loop Reference

I edited the code ^^

What about pin 14?