“Using the ThreadHandler library to run 57 hard real-time threads on an Arduino Uno with only 2048 bytes of memory.
The purpose of this project is to show of how light weight the ThreadHandler library is!
To get a full guide of all features and how to use it read my previous article on Project Hub:
https://create.arduino.cc/projecthub/adamb314/interrupting-thread-handler-3c760b
The Setup
This demo project creates 57 hard real-time threads with the ThreadHandler library. Each thread is executed periodically with 6 ms interval. The threads are spread over 7 different priorities and higher priority threads will interrupt the execution of lower ones. System tick is set to 1 ms interval. The test code executed by each thread gathers information about the amount of free memory and the absolute timing error. The loop function then prints out a summary of what the 57 threads have recorded.”