Un script para cambiar el color

Dependencies:   PixelArray USBDevice mbed

Fork of blip_rainbow_ejemplo by JJ Merelo

Revision:
7:e5c1d481ad40
Parent:
6:482c4dccb291
Child:
8:ef1c8d16f063
--- a/main.cpp	Mon Nov 30 11:40:15 2015 +0000
+++ b/main.cpp	Mon Nov 30 12:14:18 2015 +0000
@@ -38,15 +38,14 @@
     
         neopixel::PixelArray array(MATRIX_PIN);
         for(int i=0;i<NLEDS;i++) {
-            setPixel(i, pot, 0, 0);
+            setPixel(i, pot, 255-pot, 255-pot);
         }
         
-        float note=500+(pot);
+        float note=500+(pot)/100;
         speaker.period(1.0/note);           
         speaker = 50.0;
         
-        array.update(buffer, NLEDS);
-        //wait(1);    
+        array.update(buffer, NLEDS);  
 
     }