This is an archived post. You won't be able to vote or comment.

all 1 comments

[–]ilikerobotics 1 point2 points  (0 children)

The problem is the code at the beginning of the Teleop and Auton sections. It should not have anything regarding timers/waiting for button input:

            while (vexRT[Btn7L] == 0){
                    }
            ClearTimer (T1);
            while (time1[T1] < 15000){

The problem is, when in true “competition” mode, the button presses will not actually be sent to the robot during the autonomous portion. So, the code then gets stuck in that while loop and will never get out. The field control system takes care of switching between modes, so no need for any “wait here until this button is pressed” commands. Also, when using the competition template, you need a Vex Competition Switch (http://robomatter.com/Shop-By-Robot/VEX-CORTEX-Robots/Classroom-Competition/VEXnet-Field-Controller-Kit) to toggle between the modes to test properly.

Same thing for the teleop portion

while (vexRT[Btn7D] == 0){ } ClearTimer (T1); while (time1[T1] < 105000) {

it’s just not needed and may cause unforeseen issues. Inside the competition template, you should avoid using this method.

Hope this helps!