Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task schedule inconsistent at start #9

Closed
alw1746 opened this issue Nov 18, 2015 · 4 comments
Closed

Task schedule inconsistent at start #9

alw1746 opened this issue Nov 18, 2015 · 4 comments

Comments

@alw1746
Copy link

alw1746 commented Nov 18, 2015

Hi Anatoli,

Nice work on the task scheduler! I tested the first example and while it worked very well, the tasks did not follow the actual schedule until the fourth iteration. Attached the monitor result and example code which I modified to display interation count. Any clues? Could it be something odd with serial.println rather than the task itself?

regards,
Alex
Scheduler_example.txt
monitor.txt

@alw1746
Copy link
Author

alw1746 commented Nov 18, 2015

Forgot to mention I ran it on an Arduino Pro Mini 5V 16Mhz with IDE 1.6.5

@arkhipenko
Copy link
Owner

Please post your modified code here. I think I know what causes it, but want to make sure.

@arkhipenko
Copy link
Owner

Sorry, didn't realize code was attached.
This is caused by the delay (5000) statement at the end of setup().
Tasks were enabled before. Delay blocks there execution for 5 sec, so first 4 cycles they "catch up".
Try without delay or enable tasks after delay.

@arkhipenko
Copy link
Owner

Check the most recent example 1 please. This is how it is done there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants