     gStair = 0;
     stage = stage_dim;
   } else if ( stage == stage_dim ) {
-    if ( gBright <= valTop  ) {
+    if ( gBright <= topBrightness  ) {
       if ( gStair <= ( NUM_LEDS - LEDS_PER_STAIR ) ){
         for ( gStairLeds=0; gStairLeds < LEDS_PER_STAIR; gStairLeds++ ){
           leds[gUpDown[gStair + gStairLeds]].fadeToBlackBy( 6 );

void walk() {
  
  if ( stage == stage_init ){
    valTop = 200;
    // Pick two colors from the palette. 
    choosePalette();
    c1 = gPalette[gLastPalette];

                                CRGB( BRIGHTNESS, 0, 0));
CRGBPalette16 z;
int8_t gLastPalette = 15;       // track last chosen palette.
unsigned long currentMillis = millis(); // define here so it does not redefine in the loop.
long previousMillis = 0;
long previousOffMillis = 0;     // countdown power off timer
long offInterval = 30000;       // 1000mills * 30sec
long effectInterval = 40;
enum Effects { effectWalk, effectFlicker, effectFade6 };
Effects effect = effectWalk;
enum WalkEffects { sparkle, pulsate1, pulsate2, flash };
WalkEffects walk_effect = sparkle;
// Stages of the animation.  Allows for PIR sensor to re-activation the run stage of the animation.
