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.
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.
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 xkcd: Wisdom of the Ancients
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.