             show_all_led_colors();
             delay(20);
             if (constant) {
+                clear_led_colors();
+                show_all_led_colors();
+                delay(300);
                 break;
             }
         }
     }
 }
-
-
-

}

void setup() {
    interruptSetup();
    ledsetup();
}

const uint8_t delta = (256/PIXELS); //delta of hue between each pixel, spread out evenly
volatile boolean constant=0;
volatile int8_t direction = 1;
//volatile uint8_t constant_color_hue=0;
uint8_t led_colors[PIXELS][3];
volatile uint8_t constant_color_index=0;


const uint8_t rgb_colors[8][3] {
255,0,0,
255,128,0,
255,255,0,
0,255,0,
0,255,255,
0,0,255,
255,0,255,
//255,128,128,
255,255,255
};

ISR(PCINT0_vect) {

    if (PINB & (1<<3)) { //change direction
        //transition between -1,0,1
        constant = 0;
        direction += 2;
        direction = direction % 3;
        direction -= 1;
    }
    else if (PINB & 1) { //constant color
        //stop color shifting
        constant = 1;
        //constant_color_hue += 32;
        ++constant_color_index % 8;
    }
}

void show_all_led_colors() {
    cli();  
    for (uint8_t index=0; index < PIXELS; index++) {
      sendPixel( led_colors[index][0] , led_colors[index][1] , led_colors[index][2] );
    }
    sei();
    show();
}

void loop() {
    if (constant) {
        for (uint8_t index=0; index < PIXELS; index++) {
            //hsv2rgb_rainbow(constant_color_hue, led_colors[index]);
            memcpy(led_colors[index], rgb_colors[constant_color_index], 3);
            //led_colors[index][0] = rgb_colors[constant_color_index][0];
            //led_colors[index][1] = rgb_colors[constant_color_index][1];
            //led_colors[index][2] = rgb_colors[constant_color_index][2];
        }
        show_all_led_colors();
        delay(20);
    } else {
        for (uint8_t hue=0; hue < 255; hue++) {
            for (uint8_t index=0; index < PIXELS; index++) {

  
}

void sendPixel( const uint8_t rgb[3] )  {  
  
  sendByte(rgb[0]);
  sendByte(rgb[1]);
  sendByte(rgb[2]);
  
}

