Arduino-Scheduler
Portable Collaborative Multi-Tasking Scheduler for Arduino
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
SchedulerBlinkTemplateFunctions.ino
Go to the documentation of this file.
1
23
#include <
Scheduler.h
>
24
25
template
<
int
pin>
void
setupBlink
()
26
{
27
pinMode(pin, OUTPUT);
28
}
29
30
template
<
int
pin,
unsigned
int
ms>
void
loopBlink
()
31
{
32
digitalWrite(pin, HIGH);
33
delay(ms);
34
digitalWrite(pin, LOW);
35
delay(ms);
36
}
37
38
void
setup
()
39
{
40
setupBlink<13>();
41
Scheduler
.
start
(setupBlink<10>, loopBlink<10,250>);
42
Scheduler
.
start
(setupBlink<11>, loopBlink<11,500>);
43
Scheduler
.
start
(setupBlink<12>, loopBlink<12,750>);
44
}
45
46
void
loop
()
47
{
48
loopBlink<13,1000>();
49
}
loopBlink
void loopBlink()
Definition:
SchedulerBlinkTemplateFunctions.ino:30
setup
void setup()
Definition:
SchedulerBlinkTemplateFunctions.ino:38
setupBlink
void setupBlink()
Definition:
SchedulerBlinkTemplateFunctions.ino:25
Scheduler
SchedulerClass Scheduler
Definition:
Scheduler.cpp:53
SchedulerClass::start
static bool start(func_t taskSetup, func_t taskLoop, size_t stackSize=DEFAULT_STACK_SIZE)
Definition:
Scheduler.cpp:76
loop
void loop()
Definition:
SchedulerBlinkTemplateFunctions.ino:46
Scheduler.h
examples
SchedulerBlinkTemplateFunctions
SchedulerBlinkTemplateFunctions.ino
Generated on Thu Aug 31 2017 12:52:29 for Arduino-Scheduler by
1.8.11