Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: BLE_API mbed nRF51822
Fork of nRF51822_SimpleControls by
Revision 9:02ac9f6bb320, committed 2016-12-16
- Comitter:
- MarkSPA
- Date:
- Fri Dec 16 00:13:52 2016 +0000
- Parent:
- 8:e275405a431d
- Child:
- 10:eb100af346bf
- Commit message:
- Minor changes
Changed in this revision
patterns.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- 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) {