summaryrefslogtreecommitdiffstats
path: root/blinky.c
diff options
context:
space:
mode:
authorJames McKenzie <git@madingley.org>2014-12-08 23:41:25 +0000
committerJames McKenzie <git@madingley.org>2014-12-08 23:41:25 +0000
commit1d653f26054c6c866cb9e9f3236ad201d96dc1d5 (patch)
treef5081b56a2c9b2aefd30f42b3d577fbda3a399b5 /blinky.c
parenta45eb5afceb43ce6e511684bad0b65b050057eab (diff)
downloadrgb_ring-1d653f26054c6c866cb9e9f3236ad201d96dc1d5.tar.gz
rgb_ring-1d653f26054c6c866cb9e9f3236ad201d96dc1d5.tar.bz2
rgb_ring-1d653f26054c6c866cb9e9f3236ad201d96dc1d5.zip
fish
Diffstat (limited to 'blinky.c')
-rw-r--r--blinky.c11
1 files changed, 9 insertions, 2 deletions
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.