Quote:
Originally Posted by johnny_Bet
Hello people of Chief Delphi! I'm the programmer for team 4643. We are experiencing difficulties with twitching motors.  When code is disabled the motors don't twitch, leading me to conclude that it's a programming issue. I will be putting my code on github soon as well as a link to the repository but I can't right this second. Any help is appreciated!
|
Are you controlling your motors via PWM or CAN? Poorly wired robots can occasionally generate or pick up electrical noise that can make PWM controlled motors twitch.
If it's not electrical, then the next most popular option is commanding the motor multiple times in a control loop. As soon as you call motor->Set(x), the output is set. Calling motor-Set(0) later will largely insure that the motor won't move much since the 0 will be active longer, but it could still twitch from the momentary setting to an actual value.