Delay function

Hello everyone,

There is probably a post discussing this subject, but I did not find it. So my question : I want to do 1 and 10min delay, using the delay function. I was wondering is it possible to write delay(160100); or it should be written has delay(60000);?

Thanks

M.

I was wondering is it possible to write delay(160100);

Yes. That will get you a 6 second delay, not one minute. Adding the UL suffix to one of the values is a good idea.

 delay(1*60*1000UL); // one minute delay

If you use Delay(60,000) The arduino will do nothing for 60 seconds, you won't be able to cancel the delay. You might look at the "BlinkWithoutDelay" example so you can interrupt the delay if desired.

Hawk_08:
was wondering is it possible to write delay(160100); or it should be written has delay(60000);?

The compiler will pre-calculate constant math and use the result. The first there will become as delay(6000);

You should take Keith’s advice to heart. BWD shows a lesson that will allow you effectively do more than one thing at a time with Arduino.