Multiple Servos running consecutively but different operations? Arduino

Probably a strange question but before I start my attempt to write a program which might not be possible.

Arduino Uno, MicroServo 99, Separate PSU for the servos.

I have 4 small servos. I need them to operate an Automata project. For instance, I might want one servo to sweep continuously with others operating at different times, often overlapping through the cycle which would run for around four minutes.

So, before I attempt to write a program, am I expecting the impossible? If it is possible, I'm assuming 'nested' loops?

Looking forward to the challenge. I'm fine programming servos to work in sequence etc so I have some experience.

Yes entirely possible.
No, no nested loops.
Take a look at the blink without delay example.

Also check out Several things at the same time

That contains all the techniques you need.

Steve

Thank you TheMemberFormerlyKnownAsAWOL and slipstick

Very useful info - that'll stretch the grey matter somewhat :frowning:

John

You can hack what you need together with the information you've been given. You might want to consider making the program data driven. I'd be inclined to use an array of structs where each element specifies which Servo, what position and when.

Might make it simpler, might not be appropriate, depending on the patterns you need.