control multi animation ledws2812 by usb serial com
Dependencies: PixelArray WS2812 mbed
Fork of WS2812_Example by
Diff: main.cpp
- Revision:
- 1:e04a0ecefa29
- Parent:
- 0:12cb6f0c2788
- Child:
- 2:cb82a3dc4031
--- 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};