                 MODE_STATIC,
                 MODE_SMOOTH,
                 MODE_FLASH,
-                MODE_FADE
+                MODE_FADE_ALL,
+                MODE_FADE_COLOR,
         };
 
         const float SMOOTH_FREQ = 0.05,

                //Serial.println(a_b);
                //Serial.println("RECEIVED");
        }

        float r, g, b;
        switch (mode) {
        case MODE_SMOOTH:
                hsv2rgb(time * SMOOTH_FREQ, 1, 1, &r, &g, &b);
                if (time >= 1 / SMOOTH_FREQ)
                        time = 0;
                break;
        case MODE_FADE:
                {
                        float fade = time * FADE_FREQ;
                        if (fade >= 1) {
                                a_r = b_r;
                                a_g = b_g;
                                a_b = b_b;
                                hsv2rgb(random(1e6)/1e6, 1, 1, &b_r, &b_g, &b_b);
                                time = 0;
                        }
                        r = fade * b_r + (1 - fade) * a_r;
                        g = fade * b_g + (1 - fade) * a_g;
                        b = fade * b_b + (1 - fade) * a_b;
                }
                break;
        case MODE_FLASH:
                if (time >= 1 / FLASH_FREQ) {
                        hsv2rgb(random(1e6)/1e6, 1, 1, &a_r, &a_g, &a_b);
                        time = 0;
                }
        case MODE_STATIC:
                r = a_r;
                g = a_g;
                b = a_b;
                break;
        }


        TCCR3C = 0;
        TCNT3 = 0;
        TIMSK3 = 0;

        Serial.println("Hello!");
}

void loop() {
