     fade(PULSE_MIN_VAL, pulse_duration / 2);
   }
 
-  if (Serial.available() > 0) {
-    byte c = Serial.read();
-    c -= 65; // align to ASCII "A"
-    switch (c) {
-      case 32:
-        brightness = BRIGHTNESS_MIN;
-        FastLED.setBrightness(brightness);
-        break;
-      case 33:
-        brightness = BRIGHTNESS_MED;
-        FastLED.setBrightness(brightness);
-        break;
-      case 34:
-        brightness = BRIGHTNESS_MAX;
-        FastLED.setBrightness(brightness);
-        break;
-      default:
-        if (c < 24) { // filter out garbage values
-          fade(CHANGE_MIN_VAL, CHANGE_DURATION / 2);
-    
-          switch (c & B00000011) {
-            case 0:
-              pulse = false;
-              pulse_duration = CHANGE_DURATION;
-              break;
-            case 1:
-              pulse = true;
-              pulse_duration = PULSE_DURATION_SLOW;
-              break;
-            case 2:
-              pulse = true;
-              pulse_duration = PULSE_DURATION_MED;
-              break;
-            case 3:
-              pulse = true;
-              pulse_duration = PULSE_DURATION_FAST;
-              break;
-          }
-      
-          switch ((c & B00011100) >> 2) {
-            case 0:
-              hue = HUE_RED;
-              break;
-            case 1:
-              hue = HUE_ORANGE;
-              break;
-            case 2:
-              hue = HUE_YELLOW;
-              break;
-            case 3:
-              hue = HUE_GREEN;
-              break;
-            case 4:
-              hue = HUE_BLUE;
-              break;
-            case 5:
-              hue = HUE_PURPLE;
-              break;
-          }
-    
-          initialized = true;
-    
-          fade(PULSE_MIN_VAL, CHANGE_DURATION / 2);
-        }
-        break;
-    }
+  if (command != prev_command) {
+    fade(CHANGE_MIN_VAL, CHANGE_DURATION / 2);
+
+    prev_command = command;
+    initialized = true;
+
+    byte c = command - 65; // align to ASCII "A"
+
+    switch ((c & B00011100) >> 2) {
+      case 0:
+        hue = HUE_RED;
+        break;
+      case 1:
+        hue = HUE_ORANGE;
+        break;
+      case 2:
+        hue = HUE_YELLOW;
+        break;
+      case 3:
+        hue = HUE_GREEN;
+        break;
+      case 4:
+        hue = HUE_BLUE;
+        break;
+      case 5:
+        hue = HUE_PURPLE;
+        break;
+    }
+
+    switch (c & B00000011) {
+      case 0:
+        pulse = false;
+        pulse_duration = CHANGE_DURATION;
+        break;
+      case 1:
+        pulse = true;
+        pulse_duration = PULSE_DURATION_SLOW;
+        break;
+      case 2:
+        pulse = true;
+        pulse_duration = PULSE_DURATION_MED;
+        break;
+      case 3:
+        pulse = true;
+        pulse_duration = PULSE_DURATION_FAST;
+        break;
+    }
+
+    fade(PULSE_MIN_VAL, CHANGE_DURATION / 2);
   }
 
   fade(PULSE_MAX_VAL, pulse_duration / 2);

  FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS);
  FastLED.setCorrection(LED_CORRECTION);

  initialized = false;

  val = PULSE_MAX_VAL;

    }
    FastLED.show();

    // check to see if we've been given a new hue or pulse command
    // if so, hurry things along
    checkSerial();
    if (command != prev_command) {
      FastLED.delay(change_delay_ms);
    } else {
      FastLED.delay(delay_ms);
