Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

4
  • I cannot use delay, because it's blocking, and this won't go with the rest of the (bigger) program. Could you please expand a bit more on your idea of putting a fixed variable in setup()? My while loops are trying to determine the period of time to stay inside. Commented Oct 5, 2017 at 17:27
  • 1
    @Tahseen: You wrote “I cannot use delay” and yet you are using it in flash(). So what’s the deal? Commented Oct 5, 2017 at 18:20
  • Exactly... I didn't understand what you mean by "it's blocking", what's the reason you can't use it? Commented Oct 5, 2017 at 18:25
  • I used it in flash() to have the effect of lights turning on and off. But if I use it in the actual while loop, other things that I hope to incorporate in the future cannot work. For example, I want to use a radio that wakes up for 250 ms, sees if it has any command, then goes to sleep for 3 secs. If it received a command in that 250 ms interval, the arduino will flash the lights for 9 secs Commented Oct 5, 2017 at 19:04