Making Chassis Go Half Speed...

Hey guys I am trying to program my robot so that If the driver pushes both joysticks all the way up the chassis will go full speed and if the driver holds the Channel 6 Up Button the chassis will go half speed. So far I got most of it. Here is what happens.

(I have it print to screen so I know its working.)

Push both joysticks all the way forward.
Chassis goes full speed and the Variables that the joysticks retrieve to report 127.

Hold the Channel 6 Up Button.
Chassis still goes full speed but the variables say 63.

What do I need to do In order to make this work? Can someone please help?
I can post my code if needed.

Please Help!

Posting your code would be helpful. I would just have a variable of 127 divided by 1 + vexRT(ch6up) or what ever the button is and put that directly into the motor. Based on what you’ve said I think that will work.


Here is the program ^^^

Ok I will post a picture right now. I am using EasyC V4 for Cortex BTW.

It’s not letting me post the picture so I am going to put it into drop box and put the file url on here.

Try this code:

if (vexRT [Btn6U] ==1);
motor [port?] = vexRT [Ch?]/2;
motor [port?] = vexRT [Ch?]/2;
motor [port?] = vexRT [Ch?];
motor [port?] = vexRT [Ch?];

Edit* nvm this is for robotC

Sorry I do not use ROBOT C so I have to ask a couple of probably noob questions haha.

what is vexRT?

vexRT is a command that stands for the values that the joystick sends to the robot.


Do you have any tips for EasyC? Or do you only use Robot C?

Sorry I don’t have any experience with EasyC.

I figured it out guys!

It would be kinder to the rare future people who search the forum before asking for help to post your self-found solution: see also

Dear readers of the future,
If you want to modify the joystick values before using them,
you can’t use the pre-fabbed “tank4” type drive commands.

Yea I was trying to use that function block and I thought to myself “I need to change the value of the motors” so I used the motor output block and it worked.

And incase anyone else is trying this, try an If, Else statement.