Program Will Not Run Cortex

I am having some difficulty, as when I download the program to the Cortex it will not run. If I unplug the cable and then plug it in again, it will run, but it will never run on its own. I tried following this thread Trouble downloading code to Cortex but am still not having any success. Can anyone suggest what might be wrong?

Hi shodai.

Please set the project to Public, Including Code in the options window, then provide a link to the project.

Cheers, Sam.
I hope that I did this correctly. Any help is appreciated.

When it says “Do not adjust these next two lines”, this includes commenting out lines. Uncomment lines 10 through 12, and line 26.

This is a competition template program. You are using a competition switch to control the robot, yes? If you don’t need to use this program at a competition, then delete this program, and create a regular Cortex python program by unchecking the “Use VRC competition template” box in the “Create Project” dialog.


When you say you “unplug the cable”, are you referring to the competition switch cable, or the USB cable?

I tried changing the code as you suggested but still not change. When the cable is plugged in the program will run, but when it is not plugged in nothing happens.
I am referring to the USB cable going from the computer to the cortex.

So I updated the program to start from scratch, rather than a competition template (I am not 100% certain that I did it correctly) Here is the new link:
I also notice that when the USB cable is plugged in the Robot light and VEXnet light turn green. When the USB is unplugged, the Robot light flashes green and the VEXnet light flashes yellow/orange.

Looks like you’ve deleted that project, and the project linked earlier. Did you resolve your problem?

Sorry, I deleted the project and started over again. It seemed like I was having some success, but it just seems temperamental. Sometimes it seems to work and then the next time it doesn’t

Note that, for a driver control program on Cortex, the procedure is this:

  1. Set the run mode to “Download”
  2. Click the download button.
  3. Wait for it to finish downloading, then unplug the USB cable.
  4. Shut off the cortex, and turn it back on.

Each of these steps must be done in order. If you don’t do every step, the program will not work. Are you doing every step?

1 Like

Ok, so I seem to have it running consistently, now I just need to figure out the sensors, but I will start a new thread for that. Thank you very much for your help.

1 Like