Library to control NeoPixel strings of RGB leds
Dependents: NeoPixelI2cSlave NeoPixelI2cSlave
Effects/effect.h@1:f544810b6598, 2015-11-23 (annotated)
- Committer:
- dwini
- Date:
- Mon Nov 23 18:50:01 2015 +0000
- Revision:
- 1:f544810b6598
- Child:
- 3:7d32f46a38d3
Add effects and effectmanager
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
dwini | 1:f544810b6598 | 1 | #pragma once |
dwini | 1:f544810b6598 | 2 | |
dwini | 1:f544810b6598 | 3 | #include "neopixel_string.h" |
dwini | 1:f544810b6598 | 4 | |
dwini | 1:f544810b6598 | 5 | namespace Effects { |
dwini | 1:f544810b6598 | 6 | |
dwini | 1:f544810b6598 | 7 | class Effect { |
dwini | 1:f544810b6598 | 8 | |
dwini | 1:f544810b6598 | 9 | private: |
dwini | 1:f544810b6598 | 10 | NeoPixelString * pixelstring; |
dwini | 1:f544810b6598 | 11 | int delay_ms; |
dwini | 1:f544810b6598 | 12 | Ticker ticker; |
dwini | 1:f544810b6598 | 13 | bool execute_effect; |
dwini | 1:f544810b6598 | 14 | |
dwini | 1:f544810b6598 | 15 | public: |
dwini | 1:f544810b6598 | 16 | Effect(NeoPixelString * pixelstring, int delay_ms); |
dwini | 1:f544810b6598 | 17 | |
dwini | 1:f544810b6598 | 18 | public: |
dwini | 1:f544810b6598 | 19 | NeoPixelString * getPixelString(void); |
dwini | 1:f544810b6598 | 20 | void start(void); |
dwini | 1:f544810b6598 | 21 | void stop(void); |
dwini | 1:f544810b6598 | 22 | bool needsExecutionTime(void); |
dwini | 1:f544810b6598 | 23 | |
dwini | 1:f544810b6598 | 24 | public: |
dwini | 1:f544810b6598 | 25 | virtual void execute(void); |
dwini | 1:f544810b6598 | 26 | |
dwini | 1:f544810b6598 | 27 | private: |
dwini | 1:f544810b6598 | 28 | void tick(void); |
dwini | 1:f544810b6598 | 29 | }; |
dwini | 1:f544810b6598 | 30 | |
dwini | 1:f544810b6598 | 31 | }; |