Using time to blink lets your code be non-blocking where delay blocks. If you want to blink the led +and+ watch a button at the same time, using delay() means the button can only be sensed when delay() is not running and the button is down! that's what blocking does. Blink and button is 2 things, using time lets your code do more than one thing at a time!
When your code gets bigger/busier, consider that a fast running loop uses a few hundred cpu cycles per loop while a delay() wastes 16000 cycles per ms. Yikes? Timers without delay lets a sketch do wayyy more things per second!
It takes a while to learn well but it is well worth the investment!
Let me try to explain; please don't take this the wrong way.
For my feeling, your code is too dense. What throws me off is all comments that are on the same line as the statements as well as no alignment of comments. For me, it does not improve readability.
As can be seen in my post, I prefer comments on their own line, specifically for conditions but in general as well; I think that it makes the code more readable.
Further I prefer to explain an approach in steps instead of throwing code at people. Your code is sufficiently documented but requires more understanding of your thinking process while the stepwise approach is, in my opinion, more useful to beginners as it demonstrates the (or my) thinking.
Note:
I learned something new from your sketch; the use of timer0_millis for AVR based boards.
The loop counter was added to give the user a real idea of how fast void loop() runs with blink + button + counter. The first time I added a counter to a button and led example it about knocked my socks off!
Downside, the counter adds complication so perhaps I should have posted the simpler example without it. Note that this leaner and meaner counter is the product of a forum thread where better coders than myself chipped in to make it better. It is Forum Code for anyone to use, doesn't need to be understood to add to any non-blocking sketch.
What it is for is a development tool that can show the impact of sketch changes, did loop() get faster or slower and how much.
Remove the counter when the sketch is done and it runs faster!
Comments on their own lines... before or after the code line they refer to?
Since 1980 my own feelings have been that the code is the comments after a lot of fixing business code that at least 4 others had danced through (in everything is rush work mode) where too often the comments did not reflect the code.
But here, we need comments and they need to be accurate.
Also IMO, gold-standard commenting triples the amount of work it takes to write the code and is a real creativity suck!
// if it's time
if(millis() - lastTime >= interval)
{
...
...
}
Comments are important; similar to you, I add a lot of additional comments to code for the forum that will not be in my own code. Real comments, in my opinion, in my code are block comments for a part of the code that is complicated (read: that I battled with to implement correctly) so I later don't have a what-the-heck moment when I look back.
I totally agree that comments need to be accurate. I however don't agree that that they influence my creativity.