Class Timer - GSTCH/SketchMadeEASY GitHub Wiki
Topic | Specification |
---|---|
Description | Tool class with no real input. The value toggles between 0 and 1 in a defined time interval. |
Constructor |
Timer(unsigned long IntervalMSec, bool StartHigh, int Times) Parameter IntervalMSec: Interval of value change in Milliseconds StartHigh: Defines the value of the first interval.True: begins with high/1 False: begins with low/0 Times: Optional with default value -1.<=0: Endless >0: Only the defined amount times |
Range | 0…1 |
Const |
0: Timer::Low, Timer::Off1: Timer::High, Timer::On |
Samples | Timer* timer = new Timer(1000, true); Timer* timer = new Timer(1000, false, 10); |
Examples |
Example 04‐Blinking LED Example 21‐Alternate blink |