Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: PixelArray WS2812
Fork of WS2812_Example by
Diff: main.cpp
- Revision:
- 1:e04a0ecefa29
- Parent:
- 0:12cb6f0c2788
- Child:
- 2:cb82a3dc4031
diff -r 12cb6f0c2788 -r e04a0ecefa29 main.cpp
--- a/main.cpp Thu Feb 12 19:20:00 2015 +0000
+++ b/main.cpp Thu Feb 12 20:20:54 2015 +0000
@@ -4,15 +4,18 @@
#define WS2812_BUF 60
-WS2812 ws(D9,WS2812_BUF);
PixelArray px(WS2812_BUF);
+// See the program page for information on the timing numbers (eg: 0, 5, 5, 0)
+// The given numbers are for the K64F
+WS2812 ws(D9,WS2812_BUF, 0, 5, 5, 0);
+
DigitalOut led(LED1);
int main()
{
- ws.useII(2); // use per-pixel intensity scaling
+ ws.useII(WS2812::PER_PIXEL); // use per-pixel intensity scaling
// set up the colours we want to draw with
int colorbuf[6] = {0x2f0000,0x2f2f00,0x002f00,0x002f2f,0x00002f,0x2f002f};
