Does anyone know how the V5 controllers joystick values are mapped out, I don’t know if it is a coordinate system or what. Thanks!
I just found this in looking for the answer myself. I have found that the buttons on the right are “ButtonX”, “ButtonA”, and so on. The ones on the left are “ButtonRight”, “ButtonUp” and so on. The axis are labelled on the joystick. I’m still not sure about the bumpers on the back.
The joysticks return a value of -100 to 100 for horizontal and vertical axis.
have you found out the names of the back ones?
It should be written on the controller
have you gotten your physical controller yet?
L1 is Left Top, L2 is Left Bottom, R1 and R2 are on the right.
Here’s a V5 Controller Diagram, hope this can help.
The controllers are ‘mapped’ in channels as shown in the controller diagram above. To set a motor to a joystick value in C++, substitute the value input into the motor for the controller axis value. A typical tank drive would have left motor(s) on axis 3, and right motor(s) on axis 1.
- Axis 1: X axis right joystick
- Axis 2: Y axis right joystick
- Axis 3: X axis left joystick
- Axis 4: Y axis left joystick
Motor.spin(vex::directionType::rev, Controller.Axis2.value(), vex::velocityUnits::pct);
wait is the joysticks -100 to 100 or -127 to 127
-127 to 127. I’m not sure for PCT but I’m pretty sure it’s the same.
How did you get that image, did you find it online, or take it from the V5 brain?
its shown when you go to ur v5 brain Drive->Controls->Controller1 map
I know how to get the image, I just don’t understand how he got a screenshot of the V5 brain?
The PROS CLI provides a way to take a screenshot of the Brain.
How does it work, is it hard to do?
The joystick range varies from which API you are using.
If you are using VEXCode, I believe the range is ±100 (check the docs).
If you are using PROS, the range is ±127.
If you are using OkapiLib (a library inside PROS), the range is ±1.0.
Please investigate for yourself.
You just need to install PROS, and run this command in the terminal:
prosv5 v5 capture.
It will dump the screenshot into the terminal’s current directory.
I have Pros, but don’t have the robot with me right now. It wouldn’t arrive for another week.