 // This variable holds the LED color state.
 CRGB leds[NUM_LEDS];
 
-/* All the different modes that are available. */
+// All the different modes available.
 #define MAX_MODES 10
 void modeOff();
 void modeSolid();
 void modeRainbow();
+void modeRainbowCycle();
 void (*modes[MAX_MODES])() = {
     &modeOff,
     &modeSolid,
     &modeRainbow,
-    &modeOff,
+    &modeRainbowCycle,
     &modeOff,
     &modeOff,
     &modeOff,

    uint8_t val;
} pots;

/* Initial setup, called once on boot. */
void setup() {
    FastLED.addLeds<NEOPIXEL, PIN_LED>(leds, NUM_LEDS).setCorrection(TypicalSMD5050);
#ifdef DEBUG_POTS

    }
}

// Draw the rainbow, and gradually move it according to the addition parameter,
// which regulates the speed.
void modeRainbowCycle() {
    static uint8_t offset = 0;
    uint8_t hue;
    if (stepAnimation(pots.var)) {
        offset++;
    }
    for (uint8_t led = 0; led < NUM_LEDS; led++) {
        hue = map(led, 0, NUM_LEDS, 0, 255);
        hue += offset;
        leds[led] = CHSV(hue, pots.saturation, pots.val);
    }
}

// Read all potentiometers, and run one iteration of the active mode.
void loop() {
#ifdef DEBUG_POTS
