So for some reason, my drive motors are skipping/ jumping when I drive. I have had this problem before and been able to fix it, but I still can’t fix this. When I drive my x-drive chassis around in many different directions, the motors skip like crazy. I use motor controllers, all the motors are plugged in, and they are fairly new motors. I don’t have a clue how to fix this. My code is posted in picture form. The blue highlighted portion is the code that makes my motors skip. Everything else in the code works fine. Does anyone know how to fix this problem?
It’s a little hard for me to read your image right now but is it possible that in one part of the WHILE loop you have your motor ports 2 through 5 being controlled by the joystick channels 2 and 3, but then later on in your ELSE statements, when no buttons are being pressed, you are also forcing those same motor ports to be zero. ??? As the WHILE loop is cycled, I’m guessing this is turning the motors on and off very quickly.
If that’s what’s happening, it’s like naming your dog “Stay” and commanding it to come here. “Come here, Stay.”
I agree with TOSS_BOSSES; the issue that you are running into is that you are controlling one set of motors with multiple buttons. Essentially, when one button is pressed (and the motors are turned on), the others button is not (and the motors are turned off). This causes the motors to be turned on and off rapidly and causes them to ‘twitch’ when a button is pressed.
This is a fairly common issue; take a look at this post in the ROBOTC forums that goes into the issue and possible solutions more in depth.
Twitching Motors with Button Control: ROBOTC
Thank you all for the help! I was able to fix it now.