That above is the link to the code. I was just wondering what is the benefit of using a smaller step size provided that the delay() time decreases by the same factor so that the smaller step size still rotates at the same speed as the larger step size?
No great advantage, it is just a bit smoother. You can't get the delay to exactly match the motor's speed you can only get close. The more steps the more out of sync they are in the end, but the smoother is the sweep.
Oh I see. Thanks.
Another question I have is regarding the delay function within the for loops. I don't understand how the delay function corresponds to how long it takes for the motor to increase/decrease by "one" increment. Can someone explain?
I don't understand how the delay function corresponds to how long it takes for the motor to increase/decrease by "one" increment.
There may, or may not, be a relationship. Typically, the idea is to delay() longer than it actually takes the servo to move the commanded distance (delta position). That makes the servo appear to be slower that it could be.