A
A
Alexey2017-04-19 14:20:24
Arduino
Alexey, 2017-04-19 14:20:24

How to run a cycle on an arduino without brakes?

Hello!
There is an arduino leonardo + gprs shield
there is a main program, spinning in a magnifying glass
, this program starts with the lines

if (gprs.ifcallNow() || digitalRead(ledPin) == HIGH) 
  {....}

The problem is the following - if you leave the existing condition, then the program starts with a significant delay (two, three, five seconds, whatever) If you leave at least one condition (no matter what, activation from a call or from a pin), then everything works quickly (instantly )
Why is it like this, and how to live with it?)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dreambox, 2017-04-19
@Eleberet

To write such things in a loop, in my opinion, is bad manners. why not use interrupts?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question