Controls moving all motors

Newbie question here. We have our Super Clawbot wired up according to the default setup. When we operate it with the joysticks, all of the motors are activated: right and left drive, claw, wrist, shoulder. Where’s my first place to start troubleshooting? Should we be downloading a new motors and sensor setup code? I thought the cortex was preloaded with a default motor setup.

Are all your motors plugged into the Model 29 motor speed controllers? Plugging 2-wire motors directly into motor ports 2-9 on the Cortex will do what you describe.

Ports 2 through 9 all have motor controller 29s attached.

Do the motors move before you do anything on the joystick, or just when you do something with the joystick? I’m assuming the code is okay if it is the default code, or at least that’s my understanding.

It’s just when we use the joystick. It stops when we let go.

I was assuming the code was correct, but this suggests that either the wiring or code is incorrect. Check exactly what the joysticks do in the code. What ports do they output to? Make sure those ports are only on your drive.

We’ve never downloaded code to this cortex, so what’s on there is out of the box. Is there a way to check that or should I just pull up the default code in RobotC and download again?

I am certain that the Super Clawbot requires code other than the standard code that comes on the cortex (which is for the regular clawbot). You will want to upload the Super Clawbot code. I have no idea where to find that. It would probably be accessible through one of the documents you have (does it have a link?), or perhaps in RobotC’s sample code. Regardless, the code that comes by default will definitely not work.

If you’ve never uploaded code to the cortex, the default code is likely just going to power all of the motors with one joystick.

To remedy this, open a new file in robotc. In robotc, press the button “Motors and Sensors Setup” on the top row. Then, (in the “Motors” tab), name each of your motors and set them to “Motor 393” and make sure you’re putting the right motors on the right ports. (e.g. if a right drive motor is plugged into port 1, make port 1 DriveRight.) Naming your motors is really unnecessary, as you can just use the ports, but I find it helps to do that in order to more easily work on the code. Don’t worry about all the other boxes. However, for all of your left side motors, check the “reversed” box, as if these motors are set to the same power as the right side motors, they will move in the reverse direction.

Then, for each motor, you can put this code in task main:


task main()
{
    while (true) {
        motor /* Insert right drive motor name here */ ] = VexRT(Ch2); // Channel 2 on the vex controller is the right joystick
        motor /* Insert left drive motor name here */] = VexRT(Ch3); // Channel 3 on the vex controller is the left joystick
        motor /* Insert the lower lift motor name here */] = VexRT(Btn5U) * 127 - VexRT(Btn5D) * 127;
        motor /* Insert the upper lift motor name here */] = VexRT(Btn6U) * 127 - VexRT(Btn6D) * 127;
        motor /* Insert the "wrist" motor name here */] = VexRT(Btn8L) * 127 - VexRT(Btn8R) * 127;
        motor /* Insert the claw motor name here */] = VexRT(Btn7L) * 127 - VexRT(Btn7R) * 127;
    }
} 

With this code, your controls will be:
Left joystick controls left side of the drive
Right joystick controls right side of the drive
Front right two buttons control the “elbow” of the robot (You’d touch these buttons with your right pointer and middle finger)
Front left two buttons (Left pointer and middle finger) control the “shoulder” of the robot
The “Wrist” of the robot is controlled with buttons 8 R and 8 L, which are two of the four on the right.
The claw is controlled with 7 R and 7 L, two of the four on the left.

Why would that be ?

Default cortex code will run ports 1, 2 and 3 as left drive motors. ports 4, 5 and 10 as right side motors. These can be configured as either tank or arcade drive. ports 6 through 9 are assigned to buttons. All of this is configurable using jumpers in the digital ports. Details in the cortex user guide here.

M8R, this code works perfectly.
Thanks for all the help, everyone!