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 11:45f76d2b5b8c, committed 2016-12-17
- Comitter:
- MarkSPA
- Date:
- Sat Dec 17 16:04:55 2016 +0000
- Parent:
- 10:eb100af346bf
- Child:
- 12:99c81e757506
- Commit message:
- Worked on iceflake pattern
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
patterns.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Dec 16 17:02:34 2016 +0000 +++ b/main.cpp Sat Dec 17 16:04:55 2016 +0000 @@ -250,7 +250,7 @@ snowflakes(250, NUM_LEDS, m_strip); else if (pattern == PATTERN_ICE) - iceflakes(250, NUM_LEDS, m_strip); + iceflakes(150, NUM_LEDS, m_strip); else if (pattern == PATTERN_XMAS) xmas(200, NUM_LEDS, m_strip);
--- a/patterns.cpp Fri Dec 16 17:02:34 2016 +0000 +++ b/patterns.cpp Sat Dec 17 16:04:55 2016 +0000 @@ -99,7 +99,8 @@ void iceflakes(int delay, uint8_t numLEDs, neopixel_strip_t m_strip) { uint8_t led; - for (int i=0; i < numLEDs; i++) + + for (uint8_t i=0; i < numLEDs; i++) neopixel_set_color(&m_strip, i, 235,235,235); //turn every pixel white led = rand()%numLEDs;