ESC/Motor Response
#16
Thread Starter
Tech Rookie
Joined: Feb 2024
Posts: 7
I tried your code with my clone Uno with the output on pin 9 and it seems to behave as the code expects. The PWM output matches the intended value pretty much down to the microsecond. I have a little PWM tester that shows me pulse width and framerate. My Arduino is outputting @ 49Hz, which should be virtually identical to the default setting of the servo tester (the one you have should default to 50Hz and capable of 125Hz and 250Hz by pressing the button).
Some other thoughts:
Some other thoughts:
- How are you powering your Arduino board? Note that they typically run at 5V - be careful about it clashing with the output from the ESC BEC (maybe make sure the positive wire is disconnected).
- I'm using Arduino 1.8.19 (the 2.X releases don't work well with some of the add-on cores I use). It looks to be using the included Servo library in the release (ie: ...\Arduino\libraries\Servo\src\avr\Servo.cpp). Entirely possible a different version of library could behave differently.
#17
Chances are it's a bug in the Arduino core/version, so maybe check for updates on that front. From the quick scan of the R4 board, hardware PWM on pin 9 should be fine. I'd still test if it's better on one of the marked analog pins.




