Simple scheduler for ESP8266 Arduino based on Ticker
TickerScheduler(uint size);
Param | Description |
---|---|
size | Amount of task Tickers to initialize |
Example:
TickerScheduler ts(5)
boolean add(uint i, uint32_t period, tscallback_t f, boolean shouldFireNow = false);
Param | Description |
---|---|
i | Task ID |
period | Task execution period in ms |
f | Task callback |
shouldFireNow | true if you want to execute task right after first scheduler update or wait next scheduled start |
Returns:
true
- task added sucessfully
false
- task was not added
Example:
ts.add(0, 3000, sendData)
ts.update()
boolean remove(uint i)
Returns:
true
- task removed sucessfully
false
- task was not removed
Param | Description |
---|---|
i | Task ID |
boolean enable(uint i)
boolean disable(uint i)
Returns:
true
- task enabled/disabled sucessfully
false
- task was not enabled/disabled
Param | Description |
---|---|
i | Task ID |
void enableAll()
void disableAll()
- Task callback parameters support
- ...