Servo Motor Code problem

@johanwik Installation and Troubleshooting is for Problems with the Arduino itself NOT your project. It says so in the description of the section. Therefore I have moved your post here.

You may want to read this before you proceed:-
how to get the best out of this forum

Generally servos do not spin, they only turn over a limited range normally under 240 degrees. Unless you have a so called "continuous servo", which is not a servo at all but a normal motor.

You need to be a lot more specific about what your project is about before anything meaningful can be discussed.