Lauflicht schaltet kurz fehlerhaft um

Hallo,

Problem gefixt. Ich hoffe das sieht jetzt nicht nach Quick & Dirty aus? :smiley:
Jetzt guck ich mir mal die Formel von Udo an und dann muß das delay raus ... :wink:

void loop()
{
  
  for (int i=0; i <=23; i++)
  {
      PORTC = LED;    
      if (i < 23) {LED = LED << 1;}  
      if (LED > 128) {LED = 1;}
      delay(ZeitForward[i]);
      Serial.print(i); Serial.print("  "); Serial.println(LED);
  }

  delay(1000);
    
  for (int i=0; i <=23; i++)
  {
      PORTC = LED;      
      if (i < 23) {LED = LED >> 1;}        
      if (LED < 1) {LED = 128;}
      delay(ZeitBackward[i]);
      Serial.print(i); Serial.print("  "); Serial.println(LED);
  }
  
  delay(1000);
  
}