0 votes
by (120 points)
What is the need of delay in flashing the LED?

1 Answer

0 votes
by (1.5k points)
Arduino Tutorial: Using millis() Instead of delay() A well known Arduino function is delay() which pauses the program for an amount of milliseconds specified as parameter. millis() , on the other hand, is a function that returns the amount of milliseconds that have passed since program start.Sep 5, 2017');})();(function(){window.jsl.dh('15','');})();(function(){window.jsl.dh('_9xWdYMzHCMPi-gTX4ryIAg86','
');})();(function(){window.jsl.dh('17','
In this case, you can't use delay() , or you'd stop everything else the program while the LED blinked. The program might miss the button press if it happens during the delay( ) .

Related questions

0 votes
1 answer
asked Jun 18, 2021 by arduinodelay (120 points)
0 votes
1 answer
asked Jun 17, 2021 by delay (160 points)
0 votes
1 answer
asked Feb 19, 2020 by timedelays (240 points)
0 votes
1 answer
0 votes
1 answer
asked Jun 11, 2021 by timer (200 points)
0 votes
1 answer
0 votes
1 answer
asked Feb 19, 2020 by delay (160 points)
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Aug 18, 2020 by delayrelay (160 points)
...