Task Scheduler – cooperative multitasking for Arduino, ESPx, STM32 and other microcontrollers
Version 3.0.3 2019-06-13
If you find TaskScheduler useful for your Arduino project, please drop me an email: arkhipenko@hotmail.com
----------------------------------------------------------------------------------------------------------
OVERVIEW:
A lightweight implementation of cooperative multitasking (task scheduling) supporting:
1. Periodic task execution (with dynamic execution period in milliseconds or microseconds)
2. Number of iterations (n times)
3. Execution of tasks in predefined sequence
4. Dynamic change of task execution parameters (frequency, number of iterations, callback function)
5. Power saving via entering IDLE sleep mode between tasks are scheduled to run
6. Task invocation via Status Request object
7. Task IDs and Control Points for error handling and watchdog timer
8. Local Task Storage pointer (allowing use of same callback code for multiple tasks)
9. Layered task prioritization
10. Support for std::functions (tested on ESPx only)
11. Overall task timeout
12. Static and dynamic callback method binding
13. CPU load / idle statistics for time critical applications
Scheduling overhead: between 15 and 18 microseconds per scheduling pass (check the benchmark example).
Tested on the following microcontrollers:
- Arduino Uno R3
- Arduino Nano
- Arduino Micro
- ATtiny85
- ESP8266 (Node MCU v2.0)
- ESP32
- Teensy (tested on Teensy 3.5)
- STM32F1 (tested on Mini USB STM32F103RCBT6 ARM Cortex-M3 leaflabs Leaf maple mini module F)
- MSP430 and MSP432 boards
For detailed functionality overview please refer to TaskScheduler Wiki page:
https://github.com/arkhipenko/TaskScheduler/wiki
============================================================================
Check out what TaskScheduler can do:
====================================
Endeavor - build a space capable craft, with the ability to maneuver both in and out of atmosphere.
(by Radical Space Technologies
http://radicalspacetechnologies.com/2015/10/01/endeavor-phase-i/
"So after some digging I found TaskScheduler an awesome little library developed by Anatoli Arkhipenko,
his github is here and the documentation is here. Its fantastic, so far I’ve been able to replicate
some things I’ve seen in Ardupilot. ..."
link: http://radicalspacetechnologies.com/2015/10/25/endeavors-code-definitely-progress/
3 Devo - Quality 3D printing filament, now made accessible and affordable
http://3devo.eu/ (http://3devo.eu/license-information/)
Houston midi clock project - TaskScheduler with microseconds resolution
(by chaffneue: My first arduino project. It's a multi-master midi controller with a shared clock and
auto count in behaviour. Project files on github: https://github.com/chaffneue/houston
youtube: https://www.youtube.com/watch?v=QRof550TtXo)
Hackabot Nano - Compact Plug and Play Arduino compatible robotic kit
(by Funnyvale: http://hackarobot.com/
also: https://www.kickstarter.com/projects/hackarobot/hackabot-nano-compact-plug-and-play-arduino-robot)
Arduino Nano based Hexbug Scarab Robotic Spider
(by arkhipenko: http://www.instructables.com/id/Arduino-Nano-based-Hexbug-Scarab-Robotic-Spider/)
Wave your hand to control OWI Robotic Arm... no strings attached
(by arkhipenko: http://www.instructables.com/id/Wave-your-hand-to-control-OWI-Robotic-Arm-no-strin/)
APIS - Automated Plant Irrigation System
(by arkhipenko: http://www.instructables.com/id/APIS-Automated-Plant-Irrigation-System/)
IoT APIS v2 - Autonomous IoT-enabled Automated Plant Irrigation System
(by arkhipenko: http://www.instructables.com/id/IoT-APIS-V2-Autonomous-IoT-enabled-Automated-Plant/)
Interactive Halloween Pumpkin
(by arkhipenko: http://www.instructables.com/id/Interactive-Halloween-Pumpkin/)
Interactive Predator Costume with Real-Time Head Tracking Plasma Cannon
(by arkhipenko: https://www.instructables.com/id/Interactive-Predator-Costume-With-Head-Tracking-Pl/)
Party Lights LEDs music visualization
(by arkhipenko: https://www.instructables.com/id/Portable-Party-Lights/)
Changelog is located here: https://github.com/arkhipenko/TaskScheduler/wiki/Changelog
=====================================================================================