     }
 
     directionModifier *= -1;
-  //}
-}
+}

}

void rainbow(uint8_t speed, uint8_t brightness) {


//  for(j=0; j<256; j++) {
    COLOR color = getNextColor();

    for(uint16_t i = 0; i < strip.numPixels(); i++) {
      strip.setPixelColor(i, color.r, color.b, color.g);
    }
    strip.show();
    delay(speed * 4);
    //if (shouldInterruptRoutine()) { return; }
//  }
}

void chase(uint8_t speed) {
  // Initialize the array to all one color
  //COLOR color = getNextColor();
/*  for(uint16_t i=0; i<strip.numPixels(); i++) {
    strip.setPixelColor(i, color.r, color.g, color.b);
  }
  strip.show();*/




  // for(uint16_t  = 0; j < 256; j++) {
  //  colorIndex++;
    //if (colorIndex >= NUM_COLORS) { colorIndex = 0; }

    COLOR color = getNextColor();

    int pixelStart = directionModifier > 0 ? 0 : strip.numPixels() - 1;

  strip.show();
}

// Fill the dots one after the other with a color
void colorWipe(uint8_t wait) {
  COLOR color = getNextColor();
