#if defined(ESP32)
const int LED_PINS[] = {23,22,32,33,25,26,27,14,12,13};
#else
const int LED_PINS[] = {2,3,4,5,6,7,8,9,10,11};
#endif

const int NUM_LEDS = sizeof(LED_PINS)/sizeof(int);

void setup() {
  for ( int i=0; i < NUM_LEDS; i++ ) {
    // set the direction of the i-th LED pin
    pinMode( LED_PINS[i], OUTPUT ); 
    // turn on the first LED (i=0) and the rest off. 
    digitalWrite( LED_PINS[i], (i==0) ? HIGH : LOW );
  }
}

void loop() {
  for ( int i=0; i < NUM_LEDS; i++) {
    digitalWrite( LED_PINS[i], HIGH);
    delay(100);
  }
  for ( int j=0; j < NUM_LEDS; j++) {
    digitalWrite(LED_PINS[NUM_LEDS-1-j], LOW);
    delay(100);
  }
}