This is an example program for the PololuLedStrip library. It generates a simple moving rainbow pattern.

Dependencies:   PololuLedStrip mbed

For more information, see the PololuLedStrip library.

Revision:
5:8162bfbd47a1
Parent:
4:101a39472379
Child:
6:0882f93da02f
--- a/main.cpp	Thu Sep 08 23:29:47 2016 +0000
+++ b/main.cpp	Fri Nov 04 17:17:45 2016 +0000
@@ -3,7 +3,7 @@
 
 PololuLedStrip ledStrip(D8);
 
-#define LED_COUNT 155
+#define LED_COUNT 6
 rgb_color colors[LED_COUNT];
 
 Timer timer;
@@ -40,6 +40,7 @@
         {
             uint8_t phase = (time >> 4) - (i << 2);
             colors[i] = hsvToRgb(phase / 256.0, 1.0, 1.0);
+            colors[i] = (rgb_color) { 0xFF, 0xFF, 0xFF };
         }
     
         // Send the colors to the LED strip.