summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--blinky.c11
2 files changed, 10 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 46c8062..767a9a8 100644
--- a/Makefile
+++ b/Makefile
@@ -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}
diff --git a/blinky.c b/blinky.c
index 49e39a9..0600150 100644
--- a/blinky.c
+++ b/blinky.c
@@ -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.