Hi Folks,
I’m looking at the VEXcode V5 for the first time. I quickly added blocks that would cause the robot to back away and turn if one or both of the bumpers are pressed. Furthermore, I add the controller to the program.

My expectation for robot behavior is that the robot can be controlled with the controller until a bumper is pressed. Once pressed the robot backs away then turns. At that point I expect the robot to run under the control of the controller again.

Unfortunately, the robot behavior is not as expected. If the controller is operating the robot while a bumper is engage the robot will back away and tun… but only that one time… then the bumpers no longer affects the running of the robot. Screenshots are below. Any help would be appreciated.

Putting that in When Driver Control might help.

I think if I were doing this, I’d bring all my controller commands into my own code rather than using the controller configuration dialogue box. That said, there is a disable/enable controller block in the sensing toolbox. I guess the controller using the controller configuration overides what your auto code is trying to do (i.e. you controller is setting all the motors to a different power and therefore stopping your auto code). Try putting the disable controller block as the first command inside each of your if statements, and re-enable it as the last command inside each if and see if that fixes it.


You could then simplify this, but the above will help you test the theory.

1 Like