servo speed for loop

This is a for loop used in an example:

void loop() 
{ 
  for(pos = 0; pos < 180; pos += 1)  // goes from 0 degrees to 180 degrees 
  {                                  // in steps of 1 degree 
    myservo.write(pos);              // tell servo to go to position in variable 'pos' 
    delay(15);

This is not my code. I tried it and it makes the servo move really really slow. Now my question is, how do I use this for loop, and make the servo move at a more reasonable, but slow pace? Is it a question of increasing the degrees?, delay?

I would normally experiment, but my current project will not allow it, I cant afford to destroy a servo at this time. Any insight would help.

Increase the degree steps and/or decrease the delay. If you want to be careful with the servo, make the low position 20 and the high position 60 to avoid hitting the servo internal stop tab.

Thank you Zoomkat

Actually, I have another question. Is t possible, since I have multiple servos going in different directions, degrees, angles, etc. Is it possible to change the speed to all servos, or do I need to FOR loop each servo, and every motion they make???

1 Like

Instead of using a delay to slow the servo rotation speed, you may need to adapt a millis timing scheme similar to the "blink without delay" setup.