Beginner Arduino Coders: are you comfortable with using delay()?

At least for the things it does work for, you are able to use delay() and understand how it works?

I’m looking for responses and sure, post working code (use the </> code tags!) that’s not too long.

And then yeah, what happens if you try to merge sketches that use delay()? Mostly not good?

Suppose I told you that those delays can come out and the sketch work the same as before?
Sure, you say, work for nothing! Try again.

Suppose that different sketches that have no delays can run together without stepping on each other?
That’s a lot more than nothing then, is it not? To be able to start with delays and turn it cooperative?
There is a cut and dry, work from example method to do it, I hope to show it in this thread on posted code.

Lost me on that somewhere early on...

Couple of points :

  1. Look at the example “blink without delay” if you don’t want to use “ delay” in a sketch.
  2. Merging programs is poor practice , sure , see how a program works and incorporate the ideas. Don’t hack about with code.
  3. “Delay “ is fine and has valid uses

hammy:
Lost me on that somewhere early on...

Couple of points :

  1. Look at the example “blink without delay” if you don’t want to use “ delay” in a sketch.
  2. Merging programs is poor practice , sure , see how a program works and incorporate the ideas. Don’t hack about with code.
  3. “Delay “ is fine and has valid uses

Because some people don't feel ready to take BWD on or feel confused about it from what I've seen of the forum since 2011.

Because I've seen a lot of code that uses delay() here that the writers do want to keep working as is.

Because of the threads by members when they hit a limit they didn't know they put there.

And because I don't think that you know what I have up my sleeve or how I'll get it across.

Still looking for beginners who write sketches that use delay() and maybe stay within limits they know and accept.

GoForSmoke:
...And because I don't think that you know what I have up my sleeve or how I'll get it across.

I don't know but I am interested.

Without beginners invested in the delay=code they have, this boat won’t launch with a crew.

Ardly, there’s a technique I’ve posted before I call un-delay. It uses a 1-shot timer and a switch-case in a cut and dry way, get it for one is pretty much get it for all. I came up with to fix code I didn’t know the details of, it worked haltingly before the un-delay and it worked smoothly after the fix but what the GSM code was doing I can’t say – I didn’t need to know to un-delay the code is how cut and dry the method is.

But without beginners invested in the code they have, they’ll stay in the wading pool.

Maybe YOU can post a simple/generic example...

then also show your improved 'solution' for others (and beginners) to see for themselves?

Maybe I don't need to in this thread.

This thread is looking for beginners who can get delay code right.

I know they exist, I've met so many and they DO get invested in their code.

I might try a different title, a direct request for examples. Should I wait and do a different thread for that?

But I tell you what. If you're interested then please present 2 not-giant sketches that use delay() but won't work together and I'll see how few changes I need to make em work together.

If possible, no external circuits, all IO is Serial and/or led13? Then anyone with an Arduino can test.