                 led_colors[index][1]=255;
                 led_colors[index][2]=255;
             } else {
+            //if (constant_color_index != 8) { //not white
                 hue_to_compute = (256/8) * constant_color_index;
                 hsv2rgb_rainbow(hue_to_compute, led_colors[index]);
             }
         } else {
-            uint8_t offset = index * delta * direction;
+            uint8_t offset = index * delta * (direction-1);
             hue_to_compute = current_hue + offset;
             hsv2rgb_rainbow(hue_to_compute, led_colors[index]);
         }
-        
     }
     current_hue++;
     show_all_led_colors();

        offset8 <<= 1;
        asm volatile("");
        offset8 <<= 1;
    }
    
    uint8_t third = scale8( offset8, (256 / 3));
        
    memset(colors, 0, sizeof(colors));
    

    GIMSK |= (1<<PCIE); //Bit 5 PCIE: Pin Change Interrupt Enable
}


inline void timerSetup() {
    //Clock Select clk I/O /1024 (From prescaler)
    //TCCR0B |= _BV(CS02) | _BV(CS00);
    TCCR0B |= _BV(CS02);
    //CTC mode
    //TCCR0A |= _BV(WGM01);
    
    //Output Compare Register A
    //OCR0A = 0xFF;

    //OCIE0A: Timer/Counter0 Output Compare Match A Interrupt Enable
    //TIMSK0 |= _BV(OCIE0A);
    TIMSK0 |= _BV(TOIE0);
}
void init() {
}

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

ISR(PCINT0_vect) {
    cli();
    timer_counter=0;
    timer_counter2=0;
    if ((PINB & _BV(directionButtonPin)) == 0) { //change direction
        constant = 0;
        direction++;
        direction = direction % 3;
        /*direction += 2;
        direction = direction % 3;
        direction -= 1;*/
        
    }
    if ((PINB & _BV(constantButtonPin)) == 0) { //constant color
        constant = 1;
