HELP NEEDED! Spazzy robot

Hi im from team 195a and we are making a chain bar robot. Whenever we turn on our robot, one of our motors immedialy starts spazzing (it is very jittery and keeps moving even though the controller isn’t being touched). We changed the motor controller for a new one and it didn’t fix it. We also know that the motor is working cause the drivebase was working fine yesterday and this motor is part of it. What should we try next? Is this a programming issue?

Quite possibly! Make sure that in your if loops for running the motors is looks something like this!

if buttonUp == true 
then: run the motor 127

else if buttonDown == true
then: run the motor -127

then: run the motor 0

Make sure that you have the last default else loop (obviously, that is pseudo code but you get the idea), if the problem is programming; this might be causing it.

Are you touching the joystick at all when the motor is spazzing? Something may have fried, such as the brain, so plug the motor into a new brain or plug it into a backup battery using backup battery adapter that goes into the brains and plug the motor 2 pin into the backup battery adapter (the motor should run normally, if not: replace the motor).

			int left=vexRT[Ch3];

This is the code for the drive. I dont have any PID for it so nothing else is really influencing it

Might just be a copy-paste error but make sure there is a int before the right for the vexRT; and I see you’re using a tank drive.

Other than that, the code looks fairly good in that case (maybe use a deadband).

Try to do everything else I mentioned and see your results. Keep me posted.

yeap there’s an int i just realized that there was still some pid to the motors so ill comment it out and retest.
Thanks for the help!

Of course, happy to help! :slight_smile: