Joystick control for v5 blocks

Since I cannot access the V5 coding studio anymore and have only the V5 code blocks to work with, I’m trying to create a program to run the clawbot. I’m aware that I can use the one built in to the remote control, but I want to create my own program to show students how to program.

The one written in C++ is understandable to me, and I am trying to recreate that with the vexcode program blocks. No luck, since there is no spin command that uses joystick position as an output. I can set the motor velocity to the joystick position, but the robot just ignores it. Anybody have any ideas?

There are example projects in VEXcode V5 Blocks under the “Sensing” category that provide examples on how to do Wireless Controller based code. The 1.0 update to V5 Blocks will have even more examples related to using Wireless Controllers.

Generally the logic would be:

  • Inside of a “forever” loop
    – Set the velocity of an individual motor based on a controller position
    – Set the individual motor to move forward.

51%20PM

You can also configure your motors / drivetrain using the Device window, and then use the built-in Controller configuration tool to generate a Driver Control project without any code.