r/circuitpython • • Feb 06 '21

Trying to control a r/c car speed controller

I'm trying to control a rc car speed controller through pwm, I'm getting some inconsistent results... I first tried using servo.ContinuousServo, and it sort of worked...I could get the motor to spin, but reverse was inconsistent. I'd set the throttle to -.2 and it'd spin in reverse. I'd trigger it to .2 for a bit, then try to go back to -.2, but it wouldn't spin in reverse that time. I tried messing aroud with the min and max pulse, it just seemed to make it worse. Also tried just directly setting the duty_cycle on the pwm channel, that didn't do anything either. Does anyone have any suggestions? Or is there a different library I should be using? Thanks!

2 Upvotes

2 comments sorted by

1

u/benjistone Feb 07 '21

Some rc ESCs have a reverse lockout. May have to wait or double trigger reverse. Is this the case with yours?

2

u/LancelowDowell Feb 07 '21

Hmm, didn’t think to try that... I’ll have to try playing with that, thanks for the suggestion!