Control Servo Without Delay


Im having trouble with servos. Is it possible to program a servo to do a function like the sweep sketch… without using delay, perhaps millis instead. How could you do this?

Thank you for your help!

This is the sweep sketch: This is the blink without delay:

If you don't want to use delays, you have to use millis() or an interrupt to get 10ms or 15ms timing. At every timing 'tick' you can calculate what the servo should be. Someone made a VarSpeedServo, I don't know if that is useful for you:

Some info that might be of interest.