LED Chasing Lights Progamming

This is how you can do it:

volatile byte wantedPin;   // which pin to pulse on and off

const byte PWMiterations = 40;
const byte PWMdutyCycle = 2;   // <-- should be less than PWMiterations

volatile byte pwmCount;

ISR(TIMER1_COMPA_vect)
{

  // if in "on" cycle turn the LED on
  if (pwmCount > PWMdutyCycle)
    digitalWrite(wantedPin, LOW);      
  else
    digitalWrite(wantedPin, HIGH);      
   
 if (++pwmCount >= PWMiterations)
   pwmCount = 0;
}  // end of TIMER1_COMPA_vect

const int numberOfLEDs = 14;

const byte LEDorder [numberOfLEDs] = { 1, 2, 3, 4, 5, 7, 6, 8, 12, 9, 13, 10, 0, 11 };

void setup() 
  {                
  for (byte i = 0; i < numberOfLEDs; i++)  
    pinMode(LEDorder [i], OUTPUT);
    
  // set up Timer 1
  TCCR1A = 0;          // normal operation
  TCNT1 = 0;           // make sure we start at zero
  TCCR1B = _BV(WGM12) | _BV(CS10) | _BV (CS12);   // CTC, scale to clock / 1024
  OCR1A =  5;       // compare A register value (1000 * clock speed / 1024)
  TIMSK1 = _BV (OCIE1A);             // interrupt on Compare A Match
    
  }  // end of setup

void doCircle (const unsigned long delayAmount)
  {
  for (byte i = 0; i < numberOfLEDs; i++)
    {
    noInterrupts ();
    byte pin = LEDorder [i];
    wantedPin = pin;
    pwmCount = 0;
    interrupts ();
    delay(delayAmount);              
    digitalWrite(pin, LOW);
    }   // end of for
  }  // end of doCircle
  
void loop() 
  {
  for (unsigned long n = 500; n > 0; n -= 100)
    doCircle (n);
  } // end of loop

Change the constant PWMdutyCycle to get it brighter or less bright. Right now it is fairly dull (2 / 40 cycles on, the rest off).