How do I hook up the thumbs of the controller to a motor?

image

How do I make those white joysticks to control a motor on the robot? Its not letting me add a motor when I click it.

I don’t think that you can set the controller joysticks to control an individual motor using the Smart Robot Configuration.

What you can do is create a drivetrain device. If you have that added, you can use the joysticks to control the drivetrain.

If you don’t use the Smart Robot Configuration, you can program your driver control using text in the User Control function. Then you can control motors in practically any way you want. Let us know if you want some examples of that and we can point you in the right direction.

3 Likes

As @trontech569 notes, the interface for the controller configuration will only allow you to assign drivetrains to the joystick. That said, you could work around by, for example, creating a two motor drivetrain with a lift motor assigned as left and claw motor assigned as right. One of the joystick options is tank control, which would allow you to control the lift with the left joystick and the claw with the right. After using this workaround, you could study the auto-generated code and recreate the parts you actually need (or opt into expert configuration to allow editing.)

1 Like

Add a controller and your motor in the Devices tab. Then set the motor velocity to the controller position as the value.

Edit: Oops, Ill use VexCode Pro for my screenshot.

if you’re using text, can’t you just add:
MotorName.spin(forward, Controller.Axis#.position(), percent);