New To VEX V5 remote

I am a team captain, and new to VEX robotics and new to VEXCode PRO V5. I added my motors and added a remote. However it doesn’t let me add function to my two joysticks. It only allows me to add function to the other buttons. Why?

That is because if you added the remote and motors and configured your drivetrain, it automatically does your joystick functions for you. To fix that, just don’t configure your motors as a drivetrain or put them in the drivetrain motor group. Rather, just configure each motor individually.

What I noticed is it allows me to add function to the sticks if I add a drive train but does not if I add the motors individually. Is there a way to create a custom drive train. I have a 6 wheel drive train.

You would have to have your motors spin based off an input given by the controller. It would look something like this:

leftMotor1.spin(directionType::fwd, Controller1.Axis2.position(percent), percent);
leftMotor2.spin(directionType::fwd, Controller1.Axis2.position(percent), percent);
rightMotor1.spin(directionType::fwd, Controller1.Axis3.position(percent), percent);
rightMotor2.spin(directionType::fwd, Controller1.Axis3.position(percent), percent);

changing the axis and motor names based on how you want to control it.

Ok thanks a lot. However we are super new to this and just learning. How does it know which is motor1 and motor2, etc?
When I put text in like that it all turns red.

What is the names of your motors?

I haven’t named them yet, But probably will name them leftfrontmotor, leftbackmotor, rightfrontmotor, rightbackmotor

Screen Shot 2020-10-28 at 5.12.00 PM

Can i see a screen shot of your robot configuration?

Also, I would use the competition template rather than use the new program.

here you go. Keep in mind I don’t even know if I am putting this code in the right place.
Screen Shot 2020-10-28 at 5.18.03 PM

I was able to get it going using robotmesh studio, pretty straight forward. Just hoping to learn VexV5pro to teach my son who is on the team.

This just has to do with where you are putting your code. Right now, it just exists but never will be called. If you put it in

int main(){
   vexcodeInit();
   while(1){
         //put all the code here
   }
}
1 Like

The code overall looks correct, I would just recommend changing the controller axis for some of the motors to make sure it lines up with the controller side. For example, right sided drive motors use axis 2 while left sided drive motors use axis 3.

If you want to learn VEXCode V5 Pro, VEX has some pretty useful tutorials on the basic syntax.
https://kb.vex.com/hc/en-us/categories/360002333191-V5
The API helps give you some functions as well as how to use them:
https://api.vexcode.cloud/v5/html/index.html
Finally, VEXcode V5 Pro also has some pretty useful example programs. They actually have an example program for the problem listed in this forum.

3 Likes