How to delay using millis()

I don't recommend using the poor coded blink without delay() code in the Arduino-IDE-examples for the following reasons:

  1. there is no explanation of the fundamental difference how non-blocking timing works. This leaves beginners confused if they try to see a delay()-thing in millis()
  2. the code is poorly commented
  3. variable names are confusing
  4. It does not explain the principle with an easy to understand everyday example with explicit easy to understand numbers

I will NEVER get tired to post this again and again and again and again for the rest of my life until the point this blink without understand-example is replaced by a much better version (which will be the same as eternal)

I recommend to read this tutorial

best regards Stefan