0-max- 2 years ago ReplyUpvoteYou change the output angle command over time more slowly. Servo motors are controlled with a pulse that's between 1000uS and 2000uS, which sets the angle of the shaft. Ideally the pulse would cause the shaft of the motor to reach the correct position instantly..So the way you would do it is after importing the servo library (which is really unessesary since you can really just do digitalWrite(sensePin, HIGH); delayMicroseconds(value); digitalWrite(sensePin, LOW);.You have the "value" variable increment up and down. This will increment the angle in proportion to how fast the code loops, which may be undesirable. I've not dealt with arduino in a while but there may be a function which creates a busy loop until a timer resets which effectively caps the maximum speed of the void loop() function.You can use timers and interrupts which causes the increment/decrement code to run at specified time intervals much more precisely, by attaching an interrupt on an unused timer, which itself if configured to count up to a certain 16 bit unsigned integer value with a clock divider set appropriately to create as much or little delay as you want! :) As you can tell this does get a bit technical and advanced, involving ports, registers, flags, timer configurations, etc. But it's the best solution as well as it leaves your code to run independantly.