publish for RS
Dependencies: BLE_API mbed nRF51822
Fork of rbChromaOffice by
Diff: patterns.cpp
- Revision:
- 9:02ac9f6bb320
- Parent:
- 8:e275405a431d
- Child:
- 11:45f76d2b5b8c
diff -r e275405a431d -r 02ac9f6bb320 patterns.cpp --- a/patterns.cpp Fri Dec 16 00:02:07 2016 +0000 +++ b/patterns.cpp Fri Dec 16 00:13:52 2016 +0000 @@ -98,14 +98,14 @@ } void iceflakes(int delay, uint8_t numLEDs, neopixel_strip_t m_strip) { - + uint8_t led; for (int i=0; i < numLEDs; i++) neopixel_set_color(&m_strip, i, 235,235,235); //turn every pixel white - int led_to_enable = rand()%numLEDs; - neopixel_set_color(&m_strip, led_to_enable, 0, 0, 235); // set random blue + led = rand()%numLEDs; + neopixel_set_color(&m_strip, led, 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) {