Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <TaskScheduler.h>
- Scheduler runner;
- void task1() {
- // Task 1 code
- }
- void task2() {
- // Task 2 code
- }
- Task t1(1000, TASK_FOREVER, &task1);
- Task t2(500, TASK_FOREVER, &task2);
- void setup() {
- runner.addTask(t1);
- runner.addTask(t2);
- t1.enable();
- t2.enable();
- }
- void loop() {
- runner.execute();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement