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: PixelArray WS2812 mbed
Revision 3:b99f66d3e77e, committed 2017-03-12
- Comitter:
- theros
- Date:
- Sun Mar 12 23:04:00 2017 +0000
- Parent:
- 2:381421ec57e1
- Commit message:
- Debugging cleanup
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 381421ec57e1 -r b99f66d3e77e main.cpp
--- a/main.cpp Sun Mar 12 22:23:08 2017 +0000
+++ b/main.cpp Sun Mar 12 23:04:00 2017 +0000
@@ -6,7 +6,6 @@
#define NUM_COLORS 6 //number of colors to store in the array
#define NUM_STEPS 8 //number of steps between colors
-DigitalIn usrBtn(USER_BUTTON);
DigitalOut usrLed(LED1);
PixelArray px(WS2812_BUF);
@@ -48,16 +47,12 @@
std::size_t g1 = (c1 & 0x00ff00) >> 8;
std::size_t b1 = (c1 & 0x0000ff);
- printf("Starting colors (r,g,b): %d %d %d\n",r1,g1,b1);
-
//get ending RGB components for interpolation
std::size_t c2 = colorbuf[colorTo];
std::size_t r2 = (c2 & 0xff0000) >> 16;
std::size_t g2 = (c2 & 0x00ff00) >> 8;
std::size_t b2 = (c2 & 0x0000ff);
- printf("Ending colors (r,g,b): %d %d %d\n",r2,g2,b2);
-
for (int i = 0; i <= NUM_STEPS; i++)
{
ir = interpolate(r1, r2, i, NUM_STEPS);