V5 dual controller code and controllerType question

#1

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

1 Like

#2

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

0 Likes

#3

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.

0 Likes

#4

Do you mean dual control? Driving with 2 controllers?

0 Likes

#5

yes. driving with two controller

0 Likes

#6

Do you code in VEX Coding Studio?

0 Likes

#7

yes. I do use it to code my robot

0 Likes

#8

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.

0 Likes

#9

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

0 Likes

#10

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

0 Likes

#11

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?

0 Likes

#12

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

#13

thanks, this is really helpful

0 Likes