All Projects → arkhipenko → Taskscheduler

arkhipenko / Taskscheduler

Licence: bsd-3-clause
Cooperative multitasking for Arduino, ESPx and STM32 microcontrollers

Projects that are alternatives of or similar to Taskscheduler

Tts
Text-to-Speech for Arduino
Stars: ✭ 118 (-80.75%)
Mutual labels:  arduino, teensy, esp8266
Dmxusb
DMXUSB emulates an ENTTEC-compatible DMXKing USB to DMX serial device with one, two, or n universes.
Stars: ✭ 66 (-89.23%)
Mutual labels:  arduino, library, teensy
Guislice
GUIslice drag & drop embedded GUI in C for touchscreen TFT on Arduino, Raspberry Pi, ARM, ESP8266 / ESP32 / M5stack using Adafruit-GFX / TFT_eSPI / UTFT / SDL
Stars: ✭ 534 (-12.89%)
Mutual labels:  arduino, teensy, esp8266
Easyddns
Easy to Use ESP8266 DDNS Update Client Library.
Stars: ✭ 96 (-84.34%)
Mutual labels:  arduino, library, esp8266
Arduino Applemidi Library
Send and receive MIDI messages over Ethernet (rtpMIDI or AppleMIDI)
Stars: ✭ 177 (-71.13%)
Mutual labels:  arduino, teensy, esp8266
Onewirehub
OneWire slave device emulator
Stars: ✭ 195 (-68.19%)
Mutual labels:  arduino, teensy, esp8266
Esp Dash
A blazing fast library to create a functional dashboard for ESP8266 and ESP32
Stars: ✭ 548 (-10.6%)
Mutual labels:  arduino, library, esp8266
Control Surface
Arduino library for creating MIDI controllers and other MIDI devices.
Stars: ✭ 377 (-38.5%)
Mutual labels:  arduino, teensy
Esp8266 artnetnode v2
ESP8266 based WiFi ArtNet to DMX, RDM and LED Pixels
Stars: ✭ 400 (-34.75%)
Mutual labels:  arduino, esp8266
Automated Irrigation System
This is the software of an open source automated irrigation system. The complete setup including hardware can be found in the README.
Stars: ✭ 442 (-27.9%)
Mutual labels:  arduino, esp8266
Esp Mqtt Json Digital Leds
(OBSOLETE) ESP8266 MQTT JSON Digital LEDs for Home Assistant
Stars: ✭ 503 (-17.94%)
Mutual labels:  arduino, esp8266
Radiolib
Universal wireless communication library for Arduino
Stars: ✭ 350 (-42.9%)
Mutual labels:  arduino, esp8266
Sonoff Homeassistant
Firmware for ESP8266 based itead Sonoff switches for use with HomeAssistant
Stars: ✭ 354 (-42.25%)
Mutual labels:  arduino, esp8266
Deauthdetector
Detect deauthentication frames using an ESP8266
Stars: ✭ 406 (-33.77%)
Mutual labels:  arduino, esp8266
Espixelstick
Firmware for the ESPixelStick
Stars: ✭ 332 (-45.84%)
Mutual labels:  arduino, esp8266
Wifimanager
ESP8266 WiFi Connection manager with web captive portal
Stars: ✭ 4,909 (+700.82%)
Mutual labels:  arduino, esp8266
Espui
A simple web user interface library for ESP32 and ESP8266
Stars: ✭ 330 (-46.17%)
Mutual labels:  arduino, esp8266
Platformio Atom Ide
PlatformIO IDE for Atom: The next generation integrated development environment for IoT
Stars: ✭ 475 (-22.51%)
Mutual labels:  arduino, esp8266
Arduinomenu
Arduino generic menu/interactivity system
Stars: ✭ 520 (-15.17%)
Mutual labels:  arduino, esp8266
Arduino Homekit Esp8266
Native Apple HomeKit accessory implementation for the ESP8266 Arduino core.
Stars: ✭ 545 (-11.09%)
Mutual labels:  arduino, esp8266

Task Scheduler

Cooperative multitasking for Arduino, ESPx, STM32 and other microcontrollers

Version 3.2.2: 2020-12-14 Latest updates

arduino-library-badgexscode

Get expedited support or integration consultation for TaskScheduler from xs:code

xscode

OVERVIEW:

A lightweight implementation of cooperative multitasking (task scheduling). An easier alternative to preemptive programming and frameworks like FreeRTOS.

Why cooperative?

You mostly do not need to worry about pitfalls of concurrent processing (races, deadlocks, livelocks, resource sharing, etc.). The fact of cooperative processing takes care of such issues by design.

“Everybody who learns concurrency and thinks they understand it, ends up finding mysterious races they thought weren’t possible, and discovers that they didn’t actually understand it yet after all.” Herb Sutter, chair of the ISO C++ standards committee, Microsoft.

Main features:

  1. Periodic task execution, with dynamic execution period in milliseconds (default) or microseconds (if explicitly enabled) – frequency of execution
  2. Number of iterations (limited or infinite number of iterations)
  3. Execution of tasks in predefined sequence
  4. Dynamic change of task execution parameters (frequency, number of iterations, callback methods)
  5. Power saving via entering IDLE sleep mode when tasks are not scheduled to run
  6. Support for event-driven task invocation via Status Request object
  7. Support for task IDs and Control Points for error handling and watchdog timer
  8. Support for Local Task Storage pointer (allowing use of same callback code for multiple tasks)
  9. Support for 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
  14. Scheduling options with priotity for original schedule (with and without catchup) and interval

Scheduling overhead: between 15 and 18 microseconds per scheduling pass (Arduino UNO rev 3 @ 16MHz clock, single scheduler w/o prioritization)

TaskScheduler was tested on the following platforms:

  • 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

Don't just take my word for it - try it for yourself on Wokwi


TaskScheduler process diagram

Changelog is located here.

For detailed functionality overview please refer to TaskScheduler documentation in the 'extras' folder or in the Wiki page.

User Feedback:

"I've used https://github.com/arkhipenko/TaskScheduler with great success. Running LED patterns, monitoring button presses, reading data from an accelerometer, auto advancing to the next pattern, reading data from Serial. All at the same time." - here

"There are libraries that do this automatically on Arduino too, allowing you to schedule [cooperative] multitasking and sleep the uC between tasks. E.g. https://github.com/arkhipenko/TaskScheduler is really good, I've used it before. You basically queue up a list of task callbacks and a schedule in your setup() and then do a call to tasks.execute() in loop(), which pops off the next task that is due in a queue or sleeps otherwise. It's simple, but much more straightforward than manually using if millis() - last > delta1... else sleep() and not as rigid as using the timer ISRs (which really serve a different purpose)." - here

"I took the controller with me on a business trip and spend the night getting the basic code framework out. It is going to run on top of Arkhipenko’s TaskScheduler. (https://github.com/arkhipenko/TaskScheduler) This should help me isolate any issues between the different control systems while managing the different task’s timing requirements." - here

"it's really cool and useful, for whenver you want your MCU to do more than 1 task" - here

"I encourage you to use it in the Arduino environment, it allows you to save a lot of time (and code lines) wherever you need to schedule, i.e. run many tasks that should to perform at different frequencies and when we want to have the greatest control over the performance of these tasks and we want good diagnostic of errors." - here

"arkhipenko/TaskScheduler is still my choice for now, especially when I get my pull request in, so we can have that idle 1 ms sleep feature for free." - here

Check out what TaskScheduler can do:

Around the world:

My projects:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].