R/C Tech Forums - View Single Post - ESC/Motor Response
View Single Post
Old 02-25-2024 | 05:24 PM
  #16  
Mattwold42
Tech Rookie
 
Joined: Feb 2024
Posts: 7
Default

Originally Posted by PDR
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:
  • 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.
Thanks so much for taking the time to check my code and also provide input/feedback. Turns out I was able to get everything working by simply using an Arduino Uno R3 board. I had previously been using the Arduino R4 WiFi board. Surprised that the switch to the R3 resolved my issues, but grateful that it’s all working now. Any thoughts on why the R4 might have had trouble with my setup?
Mattwold42 is offline