[DUDE] Servo.write interval is necesary?


This is a simple question. I'm not using the interval between pulses with the servo, and it works fine. It's really necesary? Because im using it without intervals and nothing happens, the Servo performance is the same. :neutral_face:

(NOTE: Im talking about the interval of 15 ~ 20 miliseconds, and im using the servo with the pot)


Wild ass guess here that you're talking about the servo knob example since you didn't say?

delay(15);                           // waits for the servo to get there

As it says in the comment it's to give the servo time to get to the new position. Without that perhaps it's possible that before it got there, you would command it to start coming back again. That may or may not be the case for you depending on the servo speed, nor might it matter.

I'd say if it makes no difference to your servo and your requirements, leave it out.

In the knob example the delay is only for demo purposes I think, but if you look at a servo spec, it says something like "Speed: 4.8V: 0.12 sec/60° " , so it takes 360 milliseconds to swing from 0 to 180. If you want to make sure the servo has time to complete the move before doing another move then you would need an appropriate delay. But I would use a millis timer instead of delay.

I'm pondering the meaning of [DUDE] in the subject?