@stewa007 posted in the official RobotC tech support channel:
if (vexRT[Btn5U]==1) {
motor[LeftArm]=127;
}
else if (vexRT[Btn5D]==1){
motor[LeftArm]=-127;
}
else {
motor[LeftArm]=0;
}
if (vexRT[Btn6U]==1){
motor[RightArm]=127;
}
else if (vexRT[Btn6D]==1){
motor[RightArm]=-127;
}
else{
motor[RightArm]=0;
}
-
To help the people who are helping you, please wrap your code inside opening & closing code tags (or highlight all of the code &
press the </> button in the menu bar. -
Does it compile?
-
Is all of the above code inside a giant while loop? something like
while (1) {
all that code goes here
}
If your joystick code were inside the loop, but this code was outside the while loop, that would result in what you’re describing.
- Can you describe more about the robot? Without context, it’s hard to imagine what these motors do, when they do work. Which arm was connected to which channel on the joystick when it was working? It seems like you have 2 not-connected-to-each-other arms, yes?
More context would help.