Arduino-Scheduler
Portable Collaborative Multi-Tasking Scheduler for Arduino
SchedulerBlinkMax.ino File Reference
#include <Scheduler.h>
Include dependency graph for SchedulerBlinkMax.ino:

Go to the source code of this file.

Functions

void blink ()
 
void setup ()
 
void loop ()
 

Variables

const size_t STACK_SIZE = 256
 
int next_pin = 2
 
int min_stack = STACK_SIZE
 

Detailed Description

Version
1.0

License

Copyright (C) 2015-2016, Mikael Patel

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

Description

This Arduino sketch uses the Scheduler library. Blink with max number of pins; 64 (256) bytes per task.

Output

IDE 1.8.1, Serial Monitor, Arduino Mega 2560

SchedulerBlinkMax: started 7:setup::task=68 7:setup::main:stack=44 7:loop::i=0 8:loop::main:stack=44 9:loop::min:stack=64 1007:loop::i=1 1007:loop::main:stack=27 1008:loop::min:stack=31 2008:loop::i=2 2008:loop::main:stack=27 2008:loop::min:stack=15 ...

Note: It takes two iteration (seconds) to get stable values. The stack head room is slowly reduced depending on call depth when ISR occurs.

Definition in file SchedulerBlinkMax.ino.

Function Documentation

void blink ( )

Definition at line 55 of file SchedulerBlinkMax.ino.

void loop ( )

Definition at line 92 of file SchedulerBlinkMax.ino.

void setup ( )

Definition at line 72 of file SchedulerBlinkMax.ino.

Variable Documentation

int min_stack = STACK_SIZE

Definition at line 53 of file SchedulerBlinkMax.ino.

int next_pin = 2

Definition at line 52 of file SchedulerBlinkMax.ino.

const size_t STACK_SIZE = 256

Definition at line 49 of file SchedulerBlinkMax.ino.