Hi
Soeren after making the changes that you prescribed the Servo is still doing the same thing.
Spooky
Did it go the full way (to the end-stop)?
It shouldn't be able to go beyond approximately 45° from the center position either way, so if it does, the timing is wrong somehow...
Did you change the clock frequency relative to what this function is made for?
Maybe the pulse is either too long or too short, but then I'd expect it to be noisy when it reaches the end-stop.
Is the servo continually driven after it reaches the position (test by trying to move the arm a bit).
The Servo is not buzzing or doing anything really but just stopping when it reaches the end of its rotation. I have a modified servo that I have tested with, and it continues to rotate counterclockwise without stopping.
Hmmm, perhaps the program enters an endless loop, after having sent one or a few pulses and then stop delivering pulses at all, like if you cut the signal wire.
Since you don't mention it, I assume you don't have access to an oscilloscope, which really is the best tool for this and give you some alternative yet inferior methods for checking the servo signal wire.
1) A red (or green) LED with a resistor of 150 to 470 Ohm (whatever you may have in that range) connected in series between the servo signal and ground.
This will give off some weak light if it works. Reposition it to between +5V and the servo signal to verify that it was't just stuck on high - it should give off some light here as well.
2) A cheap headphone (usually around 32 Ohm) in series with a resistor in the same range as for the LED could replace a crystal earpiece to listen to the servo signal - this has a very distinct sound with the 50Hz repetition as the main component, bur with a bunch of harmonics, making it more "hard" than a sine wave.
3)
The best option is to get a sound card oscilloscope to check the signal, there are several freeware 'scopes and even the simplest suffice for this, but
this one has got a bunch of nice features and while a sound card 'scope is very limited, this can still help you in lots of situations beyond this.
Then make this simple interface to couple the servo signal to your microphone input
Don't substitute any of the components without checkin with me first, this is what keeps your sound card alive!
Then you can see the actual servo signal coming from your Arduino and knowing that will be a good aid in trouble shooting.
Post a screen dump from the scope trace around 25ms long (i.e. two pulses plus a little extra at each side) if you need further help.