for thww WS2811 RGB

Revision:
3:2fbb2f0e79fb
Parent:
2:ccf3f0c36dae
--- a/WS2811.cpp	Fri Apr 29 07:46:25 2016 +0000
+++ b/WS2811.cpp	Sat Jun 25 18:53:38 2016 +0000
@@ -9,7 +9,7 @@
 
 uint8_t ledmatrix[LED_MAX][3];
 
-DigitalOut myled(p20);
+DigitalOut myled(P0_22);
 
 void writeled(int pos, uint8_t g, uint8_t r, uint8_t b){    // define the register
     ledmatrix[pos][0] = g;      // green register
@@ -35,7 +35,7 @@
 }
 
 void sendColours(int pos, uint8_t r, uint8_t g, uint8_t b){
-    __disable_irq;          // disable interrupt to speed up
+    //__disable_irq;          // disable interrupt to speed up
             writeled(pos, g, r, b);     // call the underprogramm
     
     for(int led = 0; led < LED_MAX; led++){     // write the matrix on the RGBs
@@ -46,36 +46,5 @@
         }
     }
     wait(DELAY);        // wait for the supply voltage
-    __enable_irq;          // enable interrupt pin for the basic uses
-}
-
-void clear(){     // set all RGBs off
-        sendColours(0, 0, 0, 0);
-        sendColours(1, 0, 0, 0);
-        sendColours(2, 0, 0, 0); 
-        wait_ms(OFF_DELAY);
-}
-
-void runlight(float waittime){
-        sendColours(0, 100, 0, 0);
-        wait(waittime);
-        sendColours(1, 0, 100, 0);  
-        wait(waittime);  
-        sendColours(2, 0, 0, 100);
-        wait(waittime);
-        //clear();
-        sendColours(0, 0, 0, 100);
-        wait(waittime);
-        sendColours(1, 100, 0, 0);
-        wait(waittime);
-        sendColours(2, 0, 100, 0);
-        wait(waittime);
-        //clear();
-        sendColours(0, 0, 100, 0);
-        wait(waittime);
-        sendColours(1, 0, 0, 100);
-        wait(waittime);
-        sendColours(2, 100, 0, 0);
-        wait(waittime);
-        //clear();
+   // __enable_irq;          // enable interrupt pin for the basic uses
 }
\ No newline at end of file