How to program your controllers?

Our programming team has run into difficulties. as we are not sure exactly how to program our controllers. We found code from last year that looks like this: motor[leftMotor] = vexRT[Ch3] / 2;. Is this the format you use? :confused:

Why exactly are you dividing by two?

The code should be:
For Joysticks
motor[motorName] = vexRT[Ch3];

For Buttons
motor[motorName] = vexRT[Btn5U] * motorValue;

You can change the Ch3 to Ch1-4
You can Change the buttons Btn5-8 UD, and then for 7 and 8 you can also put in L and R.

Sorry if This wasn’t clear, I was in a hurry.

Maybe have a look at this:

motor[leftMotor] = vexRT[Ch3] / 2;


ASSIGN, the LEFT MOTOR to ONE HALF of the value of CHANNEL 3 of the VEX joystick.

You’ll want to run this in a loop. Without a loop this only evaluates once.

Thank you, we understand now.

I don’t know if you plan on using two remotes for driving, but if you do, you would add in (Xmtr2) to the program to make those specific commands work on the partner remote. Here is some examples from my program.


motor(firstarm) = vexRT[Ch3Xmtr2];


if(vexRT[Btn6UXmtr2] == 1)
motor(claw1) = -100;


So in your case, Octobots, if you were to use that code on a partner remote, your code would look like this:

motor[leftMotor] = vexRT[Ch3Xmtr2] / 2;