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, committed 2016-11-04
- Comitter:
- DavidEGrayson
- Date:
- Fri Nov 04 18:19:38 2016 +0000
- Parent:
- 5:8162bfbd47a1
- Child:
- 7:050f086f6f5c
- Commit message:
- Removed some testing code that I did not mean to commit.
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- 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);
}
}
David Grayson