 
     delay(ish);
 }
-


void runTracer() {
    for (int i = 0; i < sizeof(background); i++) {
      digitalWrite(background[i], PATTERN_ON);
        delay(none);
    }
    for (int i = 0; i < sizeof(letters); i++) {
      digitalWrite(Lights[i], PATTERN_ON);
      delay(250);
      digitalWrite(Lights[i], PATTERN_OFF);
      delay(250);
    }
    for(int j=0; j< 3; j++) {

      for (int i = 0; i < sizeof(letters); i++) {
        digitalWrite(Lights[i], PATTERN_ON);
        delay(none);
      }
      delay(250);
      for (int i = 0; i < sizeof(letters); i++) {
        digitalWrite(Lights[i], PATTERN_OFF);
        delay(none);
      }
      delay(250);

    }
    delay(250);
}

void runLetterPattern() {
  // if new patterns are added, add a new case statement, and bump up the max random value by one
  switch (random(0, 3)) {
  case 0: { lettersOnLeftToRight(); break; }
  case 1: { blinkLetters(random(5, 10)); break; }
  case 2: { blinkLettersOnRandom(); break; }
  default: { break; }
  }
}

void runBackgroundPattern() {
  switch(random(0, 5)) {
  case 0: { classicBackground(); break; }
  case 1: { insideOutOutsideInBackground(); break; }
  case 2: { racingOnLeftToRightBackground(); break; }
  case 3: { blinkBackground(random(5, 10)); backgroundAllOn(); break; }
  case 4: { blinkBackgroundOnRandom(); break; }
  }
}

// Arduino loop

}

void outsideInOnInsideOutOffBackground(int times, int endingWithLightsOn) {
    for (int count = 0; count < times; count++) {
        backgroundOnOutsideIn();
        delay(ish);
        if (count + 1 != times || !endingWithLightsOn) {
            backgroundOffInsideOut();
            delay(ish);
        }
    }
}

void insideOutOnOutsideInOffBackground(int times, int endingWithLightsOn) {
    for (int count = 0; count < times; count++) {
        backgroundOnInsideOut();
        delay(ish);
        if (count + 1 != times || !endingWithLightsOn) {
            backgroundOffOutsideIn();
        }
    }
}

void insideOutOutsideInBackground() {
    for (int i = 0; random(3, 8); i++) {
        if (random(0, 2) == 0) {
            outsideInOnInsideOutOffBackground(random(1, 4), true);
            delay(minimal);

            insideOutOnOutsideInOffBackground(random(1, 4), false);
            delay(minimal);
        } else {
            insideOutOnOutsideInOffBackground(random(1, 4), true);
            delay(minimal);

            outsideInOnInsideOutOffBackground(random(1, 4), false);
            delay(minimal);
        }
    }
}

void racingOnLeftToRightBackground() {
    for (int x = 0; x < sizeof(background); x++) {
        for (int y = 0; y < sizeof(background) - x - 1; y++) {
            digitalWrite(background[y], PATTERN_ON);
            delay(minimal);
            digitalWrite(background[y], PATTERN_OFF);
            delay(none);
        }

        digitalWrite(background[sizeof(background) - x - 1], PATTERN_ON);
        delay(minimal);
    }
}

void blinkBackgroundPairLeftToRight() {
    int half = sizeof(background) / 2;

    for (int count = 0; count < random(5, 10); count++) {
        for (int x = 0; x < half; x++) {
            digitalWrite(background[x], PATTERN_ON);
            delay(none);
            digitalWrite(background[x + half], PATTERN_ON);
            delay(minimal);

            digitalWrite(background[x], PATTERN_OFF);
            delay(none);
            digitalWrite(background[x + half], PATTERN_OFF);
            delay(none);
        }
    }
}

void blinkLetters(int times) {
