Hi @Reef_Engineer,
Given this is repeatable for you, it sounds like some kind of quantisation issue with the clock being used for the output timings, or the ESC has the wrong clock component or something.
I would guess that your board is only changing the pulse duration in 100µs increments, which you should be able to check by connecting some other peripheral that accepts servo-style inputs (e.g. a servo motor, or a different ESC), or an oscilloscope.
Which board type are you running the code on? It might help to try
- running on a different pin, and/or
- seeing if you can run a more direct PWM sweep without using the servo library (or at least seeing whether it’s possible to change which timer is being used for the library), and/or
- removing the serial communications, in case there’s some kind of timer interference
- this seems unlikely to me
If you have an alternative board type you can test with, or a servo tester, then you should be able to independently check whether it’s the ESC that’s the problem. If it does turn out to be the ESC then please fill out the “report a problem with a product” form on our contact page, and we should be able to send you a replacement
By the way, I’ve edited your posts to have the code in code blocks, so it’s easier for others to read, and to copy for testing. You can read about how to do that (and more) in the How to Use the Blue Robotics Forums post