running servos on a sine wave

Hello :slight_smile:

And you could calculate that delay with something like this:

delay_ms = 3 / sin( angle )

So with this example, when the angle is 90 the delay will be 3 ms until the next servo move (91 or 89) and with for example an angle of 179, the delay will be ~172 ms. I suggest you use microseconds for more accuracy.

(Be carefully with angles 0 or 180, it will divide by 0 and your Arduino may explode :D)

Oh and don't use delay() or delayMicroseconds() functions, instead look at the "Blink without delay" example to see how to do delays without those blocking functions.