Arduino-Scheduler
Portable Collaborative Multi-Tasking Scheduler for Arduino
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
SchedulerBlink.ino
Go to the documentation of this file.
1
24
#include <
Scheduler.h
>
25
26
const
int
led
= 13;
27
28
void
setup
()
29
{
30
pinMode(
led
, OUTPUT);
31
32
Scheduler
.
start
(
setup1
,
loop1
);
33
Scheduler
.
start
(
setup2
,
loop2
);
34
Scheduler
.
start
(
setup3
,
loop3
);
35
}
36
37
void
loop
()
38
{
39
blink
(
led
, 1000);
40
}
41
42
const
int
led1
= 10;
43
44
void
setup1
()
45
{
46
pinMode(
led1
, OUTPUT);
47
}
48
49
void
loop1
()
50
{
51
blink
(
led1
, 250);
52
}
53
54
const
int
led2
= 11;
55
56
void
setup2
()
57
{
58
pinMode(
led2
, OUTPUT);
59
}
60
61
void
loop2
()
62
{
63
blink
(
led2
, 500);
64
}
65
66
const
int
led3
= 12;
67
68
void
setup3
()
69
{
70
pinMode(
led3
, OUTPUT);
71
}
72
73
void
loop3
()
74
{
75
blink
(
led3
, 750);
76
}
77
78
void
blink
(
int
pin,
unsigned
int
ms)
79
{
80
digitalWrite(pin, HIGH);
81
delay(ms);
82
digitalWrite(pin, LOW);
83
delay(ms);
84
}
loop
void loop()
Definition:
SchedulerBlink.ino:37
setup3
void setup3()
Definition:
SchedulerBlink.ino:68
loop2
void loop2()
Definition:
SchedulerBlink.ino:61
setup
void setup()
Definition:
SchedulerBlink.ino:28
loop3
void loop3()
Definition:
SchedulerBlink.ino:73
led
const int led
Definition:
SchedulerBlink.ino:26
loop1
void loop1()
Definition:
SchedulerBlink.ino:49
blink
void blink(int pin, unsigned int ms)
Definition:
SchedulerBlink.ino:78
setup2
void setup2()
Definition:
SchedulerBlink.ino:56
setup1
void setup1()
Definition:
SchedulerBlink.ino:44
led1
const int led1
Definition:
SchedulerBlink.ino:42
led3
const int led3
Definition:
SchedulerBlink.ino:66
led2
const int led2
Definition:
SchedulerBlink.ino:54
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
Scheduler.h
examples
SchedulerBlink
SchedulerBlink.ino
Generated on Thu Aug 31 2017 12:52:29 for Arduino-Scheduler by
1.8.11