![](/media/cache/profiles/IMG_0710-2.jpg.50x50_q85.jpg)
Light Show library for organic, calm, light display.
Dependencies: BLE_API mbed nRF51822
Fork of mbed_blinky by
Diff: main.cpp
- Revision:
- 13:ed92d45dc9ab
- Parent:
- 11:2d3cc5459d5b
- Child:
- 14:e8a1fe69b048
--- a/main.cpp Sun Oct 11 06:07:53 2015 +0000 +++ b/main.cpp Sun Oct 11 06:42:09 2015 +0000 @@ -81,20 +81,20 @@ } tit = !tit; if (!(rgb & 0x1)) - rout = sin(in + 1.4*(in + HPI)) + 1.0; + rout = sin(in + 2.88*(in + HPI)) + 1.0; else rout = 0.0f; if (!(rgb & 0x2)) - bout = sin(in - 2.6*(in+1.571) ) + 1.0; + gout = sin(in + 2.61*(in+HPI) ) + 1.0; + else + gout = 0.0f; + if (!(rgb & 0x4)) + bout = sin(in + 3.92*(in+HPI) ) + 1.0; else bout = 0.0f; - if (!(rgb & 0x4)) - gout = sin(in + 3.32*(in+1.571) ) + 1.0; - else - gout = 0.0f; if (tit) - pc.printf("%f\t%f\t%f\n",rout,bout,gout); + pc.printf("%f\t%f\t%f\n",rout,gout, bout); red.write(rout/2.0); green.write(gout/2.0); @@ -108,7 +108,7 @@ if (bout < 0.01) rgb |= 0x4; } - wait(.0001); + wait(0.0001f); } pc.printf("\n%X\n", rgb); }