Artim
API documentation
|
The Arduino Runtime Control and Measurement library is a piece of code for the specific use-case of time discrete execution of the main loop e.g. for time triggered operations. Please check the Use Case section to see if this use case fits your needs.
In general there are two features supported:
Artim checks the execution time consumed by the loop function. It compares the time with a configured desired loop cycle time (e.g. 200ms). If the desired loop time is not reached yet, it will wait till the desired loop time is reached. This helps you to have a time discrete behaviour of your loop function. If the desired loop time is already reached or the loop took longer, there will be no delay.
Base on the desired loop time and the actual time needed, the load is calculated. Artim provides several API functions to read the load values.
The API description can be found in the generated doxygen files:
API Documentation
Doxygen Documentation Start Page
To install the library, download the zip-file of the latest version and import it in the Arduino IDE.
The official Arduino documentation might help you: Arduino Tutorial
After you installed the library, you need to include the Artim.h header file. Have a look at the example code, provided with the library.
This code is the result of a hobby project. It was never inteded to be perfect. Nevertheless, I hope that it will help one or the other to achieve their goals with a little less effort.
Improvement proposals or pull requests are welcome.