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?
Please set the project to Public, Including Code in the options window, then provide a link to the project.
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: https://www.robotmesh.com/studio/6025784840fabb29702717d5
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:
- Set the run mode to “Download”
- Click the download button.
- Wait for it to finish downloading, then unplug the USB cable.
- 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?
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.