Library to control NeoPixel strings of RGB leds

Dependencies:   PixelArray

Dependents:   NeoPixelI2cSlave NeoPixelI2cSlave

Revision:
3:7d32f46a38d3
diff -r bb9ebad05691 -r 7d32f46a38d3 Effects/color_effect.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Effects/color_effect.cpp	Fri Apr 15 14:38:13 2016 +0000
@@ -0,0 +1,20 @@
+#include "color_effect.h"
+
+namespace Effects {
+
+    ColorEffect::ColorEffect(NeoPixelString * pixelstring, neopixel::Pixel color)
+        : Effect(pixelstring, color) {
+    }
+    
+    void ColorEffect::start(void) {
+        requestExecute();
+    }
+    
+    void ColorEffect::execute(void) {
+        if (shouldExecute()) {
+            clearExecute();
+            getPixelString()->update(getColor());
+        }
+    }
+
+};
\ No newline at end of file