share for RS

Fork of rbVectorIQ by Mark @RRVA

Revision:
8:e275405a431d
Parent:
7:0db51a3107fc
Child:
10:eb100af346bf
--- a/main.cpp	Thu Dec 15 23:25:16 2016 +0000
+++ b/main.cpp	Fri Dec 16 00:02:07 2016 +0000
@@ -56,6 +56,7 @@
 #define PATTERN_XMAS                     0x09
 #define PATTERN_ICE                      0x0A
 #define PATTERN_COL                      0x0B
+#define PATTERN_IRON                     0x0C
 #define LEDS_ON                          0x01
 #define LEDS_OFF                         0x02
 
@@ -106,6 +107,7 @@
 void iceflakes(int delay, uint8_t numLEDs, neopixel_strip_t m_strip);
 void xmas(int delay, uint8_t numLEDs, neopixel_strip_t m_strip);
 void collegiate(int wait, uint8_t numLEDs, neopixel_strip_t m_strip);
+void irondude(int wait, uint8_t numLEDs, neopixel_strip_t m_strip);
 
 extern uint32_t ble_radio_notification_init(nrf_app_irq_priority_t irq_priority,
         nrf_radio_notification_distance_t    distance,
@@ -226,7 +228,9 @@
             neopixel_show(&m_strip);
             
         } else if (pattern == PATTERN_MRB) {
-            neopixel_clear(&m_strip);
+            //neopixel_clear(&m_strip);
+            for (uint8_t i = 0; i <= NUM_LEDS; i++)
+                neopixel_set_color(&m_strip, i, 0, 0, 0);
             led_to_enable = rand()%NUM_LEDS;
             neopixel_set_color(&m_strip, led_to_enable, red, green, blue);
             neopixel_show(&m_strip);
@@ -250,6 +254,9 @@
         else if (pattern == PATTERN_COL)
             collegiate(100, NUM_LEDS, m_strip);
             
+        else if (pattern == PATTERN_IRON)
+            irondude(250, NUM_LEDS, m_strip);
+            
         else
             neopixel_clear(&m_strip);