diff options
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | blinky.c | 11 |
2 files changed, 10 insertions, 3 deletions
@@ -9,7 +9,7 @@ AVRDUDE=avrdude CPPFLAGS= CPP=${CC} -E -CFLAGS=-O2 -MP -MD -Wall -Werror #-Wno-unused +CFLAGS=-O2 -MP -MD -Wall -Werror -Wno-unused OBJS=${CSRCS:%.c=%.o} ${SSRCS:%.S=%.o} @@ -10,7 +10,7 @@ #include "project.h" -#define N_COLORS 288 +#define N_COLORS (288*4) #define N_LEDS 24 @@ -31,7 +31,7 @@ map (int j, int n) static int ramp (int j, int n) { - + //n = n/2; if ((j >= -n) && (j < 0)) return map (j + n, n); if ((j >= 0) && (j <= n)) @@ -79,6 +79,7 @@ main (void) while (1) { +#if 1 for (j = 0; j < N_LEDS; ++j) { k = (j * (N_COLORS - 1)) / (N_LEDS - 1); @@ -88,6 +89,12 @@ main (void) led[j] = color[k]; } +#endif + +#if 0 + led[0].r = 255; + led[3].b = 255; +#endif ws2812_setleds (led, N_LEDS); _delay_ms (5); // wait for 500ms. |