ebun91:
Yes it's very clear. I understand it now. Thank you. One last question. Sorry. Is there any way to make the servo go slower? I mean this speed is okay, but slower might work better in my case. Thank you.
Increasing the delay() at the end of loop() would make the servo go slower. I had it set to 10 milliseconds which allows no more than 100 steps per second. Change it to a higher value to get slower servo motion.