breaking loop() on button push
second day playing arduino!
i'm looking easy way on breaking loop() on button.ispressed(). or there way can check condition after every line in loop?
i make complex loop i'm trying find 2 or 3 lines instead of 100+.
i'm looking easy way on breaking loop() on button.ispressed(). or there way can check condition after every line in loop?
i make complex loop i'm trying find 2 or 3 lines instead of 100+.
if need check switch state often, switch should wired interrupt pin, , interrupt service routine should called.
the loop function called in endless loop, many 16,000,000 times second. if can't wait 62 nanoseconds determine button pressed, there may issues code have making loop take long.
the loop function called in endless loop, many 16,000,000 times second. if can't wait 62 nanoseconds determine button pressed, there may issues code have making loop take long.
Arduino Forum > Forum 2005-2010 (read only) > Software > Syntax & Programs > breaking loop() on button push
arduino
Comments
Post a Comment