RGB LEDs Control

Dependencies:   mbed QEI PololuLedStrip

Revision:
2:69cc4148a7fa
Parent:
1:3d89bcd21002
Child:
3:972edaeae65c
--- a/main.cpp	Thu Feb 28 00:04:20 2013 +0000
+++ b/main.cpp	Wed Oct 09 01:20:26 2013 +0000
@@ -16,7 +16,7 @@
     float p = v * (1 - s);
     float q = v * (1 - f * s);
     float t = v * (1 - (1 - f) * s);
-    float r, g, b;
+    float r = 0, g = 0, b = 0;
     switch(i % 6){
         case 0: r = v; g = t; b = p; break;
         case 1: r = q; g = v; b = p; break;