V5 dual controller code and controllerType question

Can anyone show me how to cade a due controller robot? Besides, what is controllerType.

1 Like

What?:confused:
Do you have a typo or something? Could you clarify your question.

what I mean is that I want to get some example of writing a due control program (some real code). I find something called controllerType and I want to ask what is that.

Do you mean dual control? Driving with 2 controllers?

yes. driving with two controller

Do you code in VEX Coding Studio?

yes. I do use it to code my robot

You can use Controller1.ButtonL1.pressing(); or Controller2.ButtonL1.pressing(); depending on which controller you use: 1 or 2. ControllerType can be used in ControllerType::primary or ControllerType::partner when defining the controllers.

Hope it helps.

that is helpful. but how chould I connect controllerType with controller, I mean how can I say which controller is the master

Moving to Vex Coding Studio support since you said you are using VCS.
Edit: Ha never mind looks like they deleted VCS support

can you please tell me where to find that support? i’m not sure I can find it. and can you show an example program of writing dual controller?

This is how you set up the controllers

//Main controller
vex::controller mainController(vex::controllerType::primary);
//Partner controller
vex::controller partnerController(vex::controllerType::partner);
3 Likes

thanks, this is really helpful