Arduino-Scheduler
Portable Collaborative Multi-Tasking Scheduler for Arduino
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
Alarm.h
Go to the documentation of this file.
1
22
#ifndef ALARM_H
23
#define ALARM_H
24
25
#include "
Clock.h
"
26
27
namespace
Alarm
{
28
29
unsigned
long
time
= 0;
30
31
void
setup
()
32
{
33
}
34
35
void
loop
()
36
{
37
unsigned
long
seconds
=
Clock::seconds
;
38
if
((time != 0) && (seconds == time)) {
39
Serial.println(F(
"alarm"
));
40
time += 20;
41
}
42
await
(seconds !=
Clock::seconds
);
43
}
44
};
45
#endif
Alarm::loop
void loop()
Definition:
Alarm.h:35
Alarm
Definition:
Alarm.h:27
await
#define await(cond)
Definition:
Scheduler.h:162
Clock.h
Alarm::setup
void setup()
Definition:
Alarm.h:31
Clock::seconds
volatile unsigned long seconds
Definition:
Clock.h:27
Alarm::time
unsigned long time
Definition:
Alarm.h:29
examples
SchedulerAlarmClock
Alarm.h
Generated on Thu Aug 31 2017 12:52:29 for Arduino-Scheduler by
1.8.11