diff options
| author | Brad Luyster <BradLuyster@gmail.com> | 2012-07-09 19:37:24 -0400 |
|---|---|---|
| committer | Brad Luyster <BradLuyster@gmail.com> | 2012-07-09 19:37:24 -0400 |
| commit | 902b0315449bf6837cbe1d8d9c336d0ad24f9080 (patch) | |
| tree | 89ffa5f8063bae6a1b4de378910872ff96ce0736 /Arduino/Examples/example.ino | |
| parent | bb3e520d1f4d5fe577af07de3d71e954921e2a7e (diff) | |
More tests and examples.
Diffstat (limited to 'Arduino/Examples/example.ino')
| -rw-r--r-- | Arduino/Examples/example.ino | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/Arduino/Examples/example.ino b/Arduino/Examples/example.ino new file mode 100644 index 0000000..f5e3b80 --- /dev/null +++ b/Arduino/Examples/example.ino @@ -0,0 +1,22 @@ +#include <Queue.h> + +void setup() { + pinMode(13, OUTPUT); + Serial.begin(9600); + Serial.println("Alive"); + + Queue myQueue; + myQueue.scheduleFunction(testFunction, "Test", 5000, 1000); + + while(1) { + myQueue.run(millis()); + delay(10); + } +} + +int testFunction(unsigned long now) +{ + Serial.print("Hello: "); + Serial.println(now); +} + |
