Source code for the Curilights Controller. See http://www.saccade.com/writing/projects/CuriController/ for details.
Dependencies: FatFileSystem mbed
This is the source code for the Curilights controller. This lets you interactively control a string of Curilights. It provides a simple click-wheel user interface for changing colors, brightness and behavior. It responds to movement and lighting.
Finished Controller
System Block Diagram
DebugLED.cpp@4:cfef06d8bb96, 2013-02-11 (annotated)
- Committer:
- isonno
- Date:
- Mon Feb 11 05:04:18 2013 +0000
- Revision:
- 4:cfef06d8bb96
- Parent:
- 3:0ac64c4ca40f
Minor changes to add backlight routines. Not hooked up yet, shouldn't affect build operation.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
isonno |
3:0ac64c4ca40f | 1 | #include "DebugLED.h" |
isonno |
3:0ac64c4ca40f | 2 | |
isonno |
3:0ac64c4ca40f | 3 | DigitalOut gLeds[NumLEDs] = { DigitalOut(LED1), |
isonno |
3:0ac64c4ca40f | 4 | DigitalOut(LED2), |
isonno |
3:0ac64c4ca40f | 5 | DigitalOut(LED3), |
isonno |
3:0ac64c4ca40f | 6 | DigitalOut(LED4) }; |
isonno |
3:0ac64c4ca40f | 7 | |
isonno |
3:0ac64c4ca40f | 8 | void cycleLEDs() { |
isonno |
3:0ac64c4ca40f | 9 | static int curLED = 0; |
isonno |
3:0ac64c4ca40f | 10 | gLeds[curLED] = 0; |
isonno |
3:0ac64c4ca40f | 11 | curLED = (curLED + 1) % NumLEDs; |
isonno |
3:0ac64c4ca40f | 12 | gLeds[curLED] = 1; |
isonno |
3:0ac64c4ca40f | 13 | } |
isonno |
3:0ac64c4ca40f | 14 |