This is an example program for the PololuLedStrip library. It generates a simple moving gradient pattern.
Dependencies: PololuLedStrip mbed LedStripGradient
Dependents: LedStripGradient led_phare_crf
For more information, see the PololuLedStrip library.
Diff: main.cpp
- Revision:
- 9:b1c530cad69b
- Parent:
- 8:a179aad4fa2e
- Child:
- 10:557ad654e667
--- a/main.cpp Tue Feb 26 03:12:26 2013 +0000 +++ b/main.cpp Tue Feb 26 23:23:02 2013 +0000 @@ -60,6 +60,7 @@ DigitalOut led2(LED2); Timer timer; +AnalogOut signal(p18); int main() { @@ -68,6 +69,8 @@ while(1) { uint8_t time = timer.read_ms() >> 2; + signal.write_u16(time << 8); + for(uint8_t i = 0; i < LED_COUNT; i++) { uint8_t x = time - 8*i;