Hi @niko65,
as you are not the only one struggling with this topic when beginning to code I have taken some time to write some shorter examples which I coded and placed on Wokwi so that everyone interested can check the functionality:
Short Millis() Function Example
Selfmade For Loop I (Explaining how to create your "own" for loop in loop() )
Selfmade For Loop II (Demonstration why for-loop with delay() ususally blocks loop() )
Selfmade For Loop III (showing the use of the Selfmade For Loop to achieve a non-blocking loop())
I will publish the code in a separate thread to keep this thread clean but post the link to it after it has been established. They are probably not best practice in all aspects therefore I am open for improvements so that these examples may grow and can be used in future as a simple reference for beginners.
ec2021
The link to the source code is