 #define CHANGE_MIN_VAL 64
 #define CHANGE_DURATION 800
 
+#define BRIGHTNESS_MAX 255
+#define BRIGHTNESS_MED 106
+#define BRIGHTNESS_MIN 32
+
 // state
 CRGB leds[NUM_LEDS];
+
 bool initialized;
+
 uint8_t hue;
 uint8_t val;
 bool pulse;
 long pulse_duration;
 
+volatile bool buttonDebounced;
+volatile uint8_t brightness;
+
 
 
 void fade(uint8_t new_val, long duration) {
   if (val == new_val) {
+    // setBrightness() requires a call to delay() periodically
+    FastLED.delay(duration);
     return;
   }
   


  fade(PULSE_MAX_VAL, pulse_duration / 2);
}


    // check to see if we've been given a new command, if so, hurry things along
    if (Serial.available() > 0) {
      FastLED.delay(change_delay_ms);
    } else {
      FastLED.delay(delay_ms);
    }
  }

