     }
     FastLED.show();
 
-    // check to see if we've been given a new command, if so, hurry things along
-    if (Serial.available() > 0) {
+    // 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);

// state
CRGB leds[NUM_LEDS];

bool initialized;

uint8_t hue;

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

  prev_command = 122; // initialize to invalid command so any valid command will trigger action
  command = 122;
  initialized = false;

  val = PULSE_MAX_VAL;
