 // 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,

    }
}

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

    }
}

// stepAnimation returns true if it is time for the next step in the animation,
// according to the speed parameter.
bool stepAnimation(uint8_t speed) {
    static uint32_t lastClock = 0;
    uint32_t diff;
    uint32_t clock;
    uint32_t expectedDelay;
    bool rval;

    /* Animations are disabled when speed is zero */
    if (speed == 0) {
        return false;
    }

    clock = millis();
    diff = clock - lastClock;

    /* Otherwise, delay 1000/speed milliseconds. */
    expectedDelay = map(speed, 1, 255, 1000, 40);
    rval = (diff >= expectedDelay);

    if (rval) {
        lastClock = clock;
    }

    return rval;
}

// Read a value from an analog pin as a byte value between 0-255.
uint8_t adc8(uint8_t pin) {
    uint16_t analog = analogRead(pin);
