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:
6:0882f93da02f
Parent:
5:8162bfbd47a1
--- a/main.cpp	Fri Nov 04 17:17:45 2016 +0000
+++ b/main.cpp	Fri Nov 04 18:19:38 2016 +0000
@@ -3,7 +3,7 @@
 
 PololuLedStrip ledStrip(D8);
 
-#define LED_COUNT 6
+#define LED_COUNT 60
 rgb_color colors[LED_COUNT];
 
 Timer timer;
@@ -40,11 +40,9 @@
         {
             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.
         ledStrip.write(colors, LED_COUNT);
-        wait_ms(10);
     }
 }