I’ve been having issues with getting the code shown in the picture to work when the code is downloaded to the robot. According to robotc there is no error during the compiling, and yet it still doesn’t work, and i’m kind of at a stopping point. If you could figure out whats wrong that would be great!
It looks like you have the following control structure (pseudo code)
if Button 7 up pressed then run lift up else stop lift end if Button 7 down pressed then run lift down else stop lift end
The two if-then-else statement will fight each other, for example, if you press the 7 up button then the motors will try and move the lift up but, as the 7 down button is not pressed, the second conditional statement will also try and stop the motors.
Restructure the code like this.
if Button 7 up pressed then run lift up else if Button 7 down pressed then run lift down else stop lift end