Simple 8x8 LED Matrix controller which interfaces with a Processing GUI over serial to display sketches
Dependencies: Multi_WS2811 mbed
Fork of Multi_WS2811_test by
Revision 14:c97261a9a282, committed 2013-07-28
- Comitter:
- heroic
- Date:
- Sun Jul 28 08:38:18 2013 +0000
- Parent:
- 13:1f65330abe92
- Child:
- 15:331e139672b5
- Child:
- 16:5f75ea93f15d
- Commit message:
- Cleanup.
Changed in this revision
| WS2811.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/WS2811.cpp Tue Jul 23 22:32:14 2013 +0000
+++ b/WS2811.cpp Sun Jul 28 08:38:18 2013 +0000
@@ -15,7 +15,8 @@
clk(clockPin) {
// Allocate 3 bytes per pixel:
numLEDs = n;
- if ((pixels = (uint8_t *)malloc(numLEDs * 3))) {
+ pixels = (uint8_t *)malloc(numLEDs * 3);
+ if (pixels) {
memset(pixels, 0x00, numLEDs * 3); // Init to RGB 'off' state
}
// calibrate delay loops for NRZ
