Hi,
I presume that the code you posted is supposed to make the servo continuously rotate in one direction?
But you are finding that it slows to a stop after a few minutes.
How are you powering the servo?
If you are using the Arduino 5V it will not be able to supply the current necessary to drive the servo, especially continuously, you will need a separate supply for the servo with its gnd connected to the Arduino's gnd.
What model Arduino are you using?
Thanks.. Tom.. ![]()