kloon / OpenBeerFiller

An opensource beer filling line microcontroller
GNU General Public License v3.0
39 stars 13 forks source link

Use millis instead of delay #10

Open kloon opened 4 years ago

kloon commented 4 years ago

Currently, there are still some blocking function calls running that relies on using delay() for waiting before another function/event fires.

Using mills() combined with more program states instead of delay() we can eliminate all these blocking calls ensuring the main loops stays non-blocking.

See this tutorial for more details on millis() benefit over delay() and how to use it.