Two controllers

Hi, someone knows how to program a template with robotC in which the robot can be controlled with two controllers?
Thanks for the info

I agree, someone does… ME!

To change a control to the second controller, add “Xmtr2” to the end of the channel or button.

On the first controller


On the second controller


Hope this helps, and is what you are looking for!

Add “Xmtr2” to the end of each channel or button


Make sure that your joysticks are connected by a partner cable.
Or if you are using a PIC controller, make sure you have 2 crystals plugged in to the microcontroller.

I was too slow.

There is no template for this. Just put an Xmtr2 after the channel or button controlling what you want to move.
So if I were trying to make the port 1 motor move on the second controller on Channel 2:

 motor[port1] = vexRT[Ch2Xmtr2] ;

would do the trick.

Here is the general page explaining how to access every input on either controller.

Also the RobotC API is worth a read through as it has pretty good explanations on other things like functions, tasks etc.