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.

Files at this revision

API Documentation at this revision

Comitter:
DavidEGrayson
Date:
Fri Nov 04 17:17:45 2016 +0000
Parent:
4:101a39472379
Child:
6:0882f93da02f
Commit message:
New library version.;

Changed in this revision

PololuLedStrip.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/PololuLedStrip.lib	Thu Sep 08 23:29:47 2016 +0000
+++ b/PololuLedStrip.lib	Fri Nov 04 17:17:45 2016 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/DavidEGrayson/code/PololuLedStrip/#5368af3ff07d
+http://mbed.org/users/DavidEGrayson/code/PololuLedStrip/#d72818ba17cc
--- 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.