This is my first year to teach robotics with VEX IQ and code blocks. My students used code blocks to change the buttons on the controller that move the motors . We noticed that the motors run faster when they use driver control and slower when they use their program. I have no idea why the motors would run slower. They did not write code. They just used the part of the program that allows you set up the drive train and motors to the controller.
Is the code just telling the motors to spin when programming the buttons? You might need to change the default velocity of spin commands or explicitly state it in the button pressing spin command.
Please post what you have so far.
They just set up button actions.
Drivetrain motors 1,12,6
Wheel size 200mm
Gear ratio 3:3
Devices Motor 4 ,5,10
Controller motor 10 L buttons
motor 4 R buttons
motor5 F buttons
They did not write out code for moving the robot. They just set up button actions.
Please forgive my repeat of the first sentence. I am trying to use the correct terminology.
The Joystick determines how fast the DriveTrain moves, so pushing it all the way forward makes the drive go 100%. Pushing the joystick 1/2 way, makes it go 50%.
You don’t get that level of ‘analog’ control on speed with buttons, they’re on or off. By default VEXCode blocks sets the motor velocity to 50%. You can adjust that with the ‘set motor velocity’ block. Here’s an example:
Thank you very much for the information.