Hi All, I have looked at a lot of code here on the forum and everyone seems to use the delay function, which I think stops execution of the program and waits for the time to run out? Why not use the Millis timer function and scan other parts of the program for possible execution. This requires some variables to do though. Is this a dumb question, trying to understand concepts? 8) TIA
There is the famous blink without delay tutorial doing exactly what you propose.
delay can be useful sometimes (quick prototyping), and yes it blocks but that might exactly be the requirement
Usually I see here beginners asking questions and so delay is easier to use - and for more questions here is more important simplicity than effectivity
have looked at a lot of code here on the forum and everyone seems to use the delay function,
I for one don't believe that you have look at ANY code here. If you had you would have noted the numbers of times we respond by pointing people to the blink without delay example. Nor have you noticed the other post pointing people at polling and FSM's
I for one don't believe that you have look at ANY code here.
If I hadn't looked here, I would have never been able to hook up my Nokia 5110 LCDs and be able to make them work. I wouldn't have found other needed items to be able to make my projects work right.