kc15781:
It's working with delayMicroseconds thank you! but it is not as smooth as what I got from the library
As has been asked before;
Why don't you use the servo library?
What you have to realize is that without the library, you trying to do some output timing while you code also has to do other activities.
You code might not get to the part of the code that decides if the servo signal needs to go HIGH or LOW on the exact microsecond you want.
It may be 10 or 15 us late, which means your servo pulse may be 10 or 15us longer or shorter.
The more code you have around it the more inaccuracy in your servo signal because your code has more and more other things to do.
Tom... ![]()