How do I code a controller using left arcade controls in VEXcode - text?

I have been trying to figure this out for a while but I haven’t been able to. I guess I need the drive train to be able to use the joystick when i add the controller under the devices, but I don’t know how to make code for the drivetrain to drive when you move the left stick. Any help would be GREATLY appreciated.

Have you tried looking at the example programs?

If you want to set a motor to the joystick use:
Motor.spin(forward, Controller1.Axis3.value() , pct);

Axis 3 would the joystick that has a 3 next to it.
The 1st parameter tells what direction to spin, the 2nd parameter tells the motor how fast to spin, and the 3rd parameter is the velocity units.

EDIT: this is for vex EDR but for VexIQ it’s the same general concept. You want to set the motor value to the joystick

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.