     }
 }
 
+void bitrot() {
+    // start with all lights on w/ current color then
+    // randomly turn off one light at a time until all
+    // are gone
+        
+    while (button2State == HIGH) {
+        
+        // reset the LEDs to the current color in case the button
+        // is held past one bitrot cycle
+        for (int i=0; i < strip.numPixels(); i++) {
+            strip.setPixelColor(i, strip_color);
+        }       
+        
+        while (!bitrot_rotten) {       
+            // chose a random LED
+            bitrot_led = rand()%strip.numPixels();
+            strip.setPixelColor(bitrot_led, strip.Color(0, 0, 0));
+            strip.show();
+            
+            delay(10);
+            
+            // check if all lights are off
+            for (int i=0; i < strip.numPixels(); i++) {
+                if (strip.getPixelColor(i) > 0) {
+                    // found a lit LED, not all off yet
+                    bitrot_rotten = false;
+                    break;
+                } else {
+                    bitrot_rotten = true;
+                }
+            }
+        }
+        
+        bitrot_rotten = false;        
+        button2State = digitalRead(button2Pin);
+    }
+}
+
 void loop() {
     // check for LED count mode
     if (set_LED_count_mode == true) {

byte palette_choice = 0;

// pattern vars
byte pattern_choice = 3;
boolean shimmy_even = true;

void setup() {
    if (DEBUG) {

            case 3:
                fountain();
            case 4:
                bitrot();
            case 5:
                bullet();
            case 6:
