Simultaneous Delayed Programs

Hi all,

This is probably a really beginner-level question, so sorry for asking. How can I set a function to start running ten seconds after loop starts and keep running?

You're absolulety right - it is a beginner-level question.

Have you worked though any of the beginner-level examples provided in the IDE?

Why not?

No. Which ones should I look in to find this?

chessy:
No. Which ones should I look in to find this?

All of them, I’d say.

I can't find it. Can you please just give me the answer?

Sure. You can find find them in File -> Examples.

lg, couka

Can you tell me a specific program that contains it?

Have a look at the demo Several Things at a Time which illustrates the use of millis() to manage timing. It is an extended example of the Blink Without Delay example in the Arduino IDE.

To do what you want you need to record the value of millis() as the very last thing in setup() and then start your function when 10,000 millisecs have elapsed after that.

...R

Thanks Robin

Without being rude, I think 'starting' code after a delay is the least of the OPs problems.

If he couldn't find a tutorial for delay() or millis(), then we should bookmark his name for special attention in the future.

chessy: Can you tell me a specific program that contains it?

If you know enough C then you have some chance to understand what you want Naow instead of half baking someone else's code and coming back soon.

Slapping copied bits together won't save you time.

lastchancename: then we should bookmark his name for special attention in the future.

I don't think that is helpful for a newbie.

...R