hello sir i want to know that how it is possible to execute the programme in the cicle of every 10 minutes in device .suppose i run the programme at 10:00 am it will re- run after 10:10 am automatically
thanks.
ram kumar
hello sir i want to know that how it is possible to execute the programme in the cicle of every 10 minutes in device .suppose i run the programme at 10:00 am it will re- run after 10:10 am automatically
thanks.
ram kumar
Multiple ways.
You could use a delay of 10000 600000. But that would block everything else in your sketch from running during that time.
You could use millis(). This would not block other parts of your sketch from running. Look at the Blink without delay example in your IDE. There are also some good tutorials linked at the top of the forum.
You could use an RTC (Real Time Clock) and check if 10 minutes have passed.
Or you could pay someone to stand there and hit the reset button every 10 minutes. That might get expensive though.
I'm sure there are probably other ways as well. But the millis() option is where I would start. Of course, if there is no other code that needs to run, the delay would be the easiest.
DangerToMyself:
You could use a delay of 10000.
...and call it multiple times.
AWOL:
...and call it multiple times.
Yup. I didn't quite do the math correctly with that one. Wow. Waaaaaay off!