share for RS

Fork of rbVectorIQ by Mark @RRVA

Revision:
8:e275405a431d
Parent:
7:0db51a3107fc
Child:
9:02ac9f6bb320
--- a/patterns.cpp	Thu Dec 15 23:25:16 2016 +0000
+++ b/patterns.cpp	Fri Dec 16 00:02:07 2016 +0000
@@ -105,7 +105,7 @@
     int led_to_enable = rand()%numLEDs;
     neopixel_set_color(&m_strip, led_to_enable, 0, 0, 235); // set random blue
     neopixel_show(&m_strip);
-    wait_ms(delay); 
+    //wait_ms(delay); 
 }  
 
 void xmas(int delay, uint8_t numLEDs, neopixel_strip_t m_strip) {
@@ -141,4 +141,23 @@
         neopixel_show(&m_strip);
         wait_ms(delay);  
     }   
+}
+
+void irondude(int delay, uint8_t numLEDs, neopixel_strip_t m_strip) {
+    
+    for (int i=0; i < numLEDs; i++) 
+        neopixel_set_color(&m_strip, i, 255,255,255);  //turn every pixel white
+  
+    for (int i=0; i < numLEDs; i++) {
+        neopixel_set_color(&m_strip, i, 255,0,0);    //change whites to reds
+        neopixel_show(&m_strip);
+        wait_ms(delay); 
+    }
+    wait_ms(delay);
+  
+    for (int i=0; i <= numLEDs; i++) {
+        neopixel_set_color(&m_strip, numLEDs - i, 255,255,255);    //change reds to white, in reverse
+        neopixel_show(&m_strip);
+        wait_ms(delay); 
+    }
 }
\ No newline at end of file