Can the VEX V5 run code straight from upload?

Hey there

I am trying to use a VEX V5 for a non-competition autonomous robotics application. I need to be able to upload code and have the robot execute it immediately without having to select a program and then press run. Is this possible? If so then how can it be done? If not is it possible with the old vex cortex models?

cheers

If the robot is still connected to the computer, after downloading the program, you can start it using the computer, with the play button next to the download button. (in VEXcode V5)

Either the robot or it’s controller will have to be connected to the computer though.

3 Likes

Thank you that’s a good tip and very applicable in my case. I was really hoping to use VScode and PROS for this application though, any chance there’s a similar function available there?

With PROS, if you’re uploading through the terminal, the flag --after run means the program will execute immediately after upload. I believe the VS Code extension doesn’t directly support this, but you can force this behavior (without the flag) on all uploads by adding "after": "run" to "upload_options": {} in your project.pros, which should work on uploads through the extension.

4 Likes

I haven’t tried in V5, but in IQ, the play button runs whatever program is selected on the brain, whether or not the code in it matches the code in your app. In other words, if you change the code and press play, the robot will run the program already downloaded to it, not the modified, non-downloaded one in your app.

Correct, which is why you hit run