recently I was thinking about a tutorial that shall show the basic principle of non-blocking timing and state machines.
A visualisation similar to a debugger that shows how program-execution proceeds from line to line would be a great thing for easy understanding how a loop is running fast and comes across if-conditions where the if-conditions become true after some time.
So can somebody recommend a software that is VERY easy to use where I can create a series of pictures and the software puts all the pictures together to an animation.
picture one: first line of code highlighted
picture two: second line of code highlighted
...
in this case the important thing is to understand the loop is looping at high speed
and if-conditions are executed at high speed and only after a greater amount of time the if-condition evaluates to true.
This is fundamental opposite to a "linear" execution-pattern like this
totally shitty blink with delay example code that leads almost any newcomer
to this "linear" execution-pattern
void loop() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
hence the animation to show the totally different nature of non-blocking-timing.
I could upload a video to youtube to save arduino.cc server-capacity
best regards Stefan