Getting driver mode to program mode

Last time I tried downloading a program i accidently downloaded it on the driver control, we have a new cortex and program and i do not want to mess this one up, so how do i do this?

Are you using easyC? If so, all you need to do is highlight the program that you put into your driver control block and copy/paste is into your autonomous block. I might be mistaking but from how it sounds that is all you need to do.

Not sure I understand what you are asking, are you using EasyC or RobotC? In either case the cortex essentially only has one program loaded at a time, whatever you download is the program that will run. The VEX default code is included with both programming environments so you could download that if you want to use it for driver control, or optionally modify it to your own specification. Most users will write their own version of driver control and integrate with autonomous code in the competition templates provided.

I am using Robotc. So if I understand you correctly, whenever I download my program it will wipe out anything on the cortex? does this mean when we goto competitions we will have to download the drivers after we run in autonomous mode? I was hoping there was a way to download my autonomous program and they will still be able to use their drivers after i am done with autonomous mode.

I haven’t played with RobotC for the Cortex, yet, but from what I understand, the Programming Template has an Autonomous Section and a Operator Interface Section…

Your Autonomous Code, goes in the First Section, your Driver Control goes in the Second Section… When the Match Starts, the Autonomous Sections runs first, for 20 Seconds IIRC, then Rolls Over to the Driver Section for the Remainder of the Match…

Work your way through the many tutorials on the ROBOTC web site, it will explain much of what you need to know. Here is the very short version of how to setup code for competition.

Create a new competition template using this menu…

https://vexforum.com/attachment.php?attachmentid=5302&stc=1&d=1328906623

It will present you with this code (more or less, I deleted a few comments to make it smaller to post).

#pragma platform(VEX)

//Competition Control and Duration Settings
#pragma competitionControl(Competition)
#pragma autonomousDuration(20)
#pragma userControlDuration(120)

#include "Vex_Competition_Includes.c"   //Main competition background code...do not modify!

/////////////////////////////////////////////////////////////////////////////////////////
//
//                          Pre-Autonomous Functions
//
// You may want to perform some actions before the competition starts. Do them in the
// following function.
//
/////////////////////////////////////////////////////////////////////////////////////////

void pre_auton()
{
	// All activities that occur before the competition starts
	// Example: clearing encoders, setting servo positions, ...
}

/////////////////////////////////////////////////////////////////////////////////////////
//
//                                 Autonomous Task
//
// This task is used to control your robot during the autonomous phase of a VEX Competition.
// You must modify the code to add your own robot specific commands here.
//
/////////////////////////////////////////////////////////////////////////////////////////

task autonomous()
{
    // Autonomous code goes here
}

/////////////////////////////////////////////////////////////////////////////////////////
//
//                                 User Control Task
//
// This task is used to control your robot during the user control phase of a VEX Competition.
// You must modify the code to add your own robot specific commands here.
//
/////////////////////////////////////////////////////////////////////////////////////////

task usercontrol()
{
	// User control code here, inside the loop

	while (true)
	{
        // Put driver control code here....
	}
}

Place you autonomous and driver control where I highlighted comments in red. Use motor and sensors setup in the usual way to define which ports you are using. You can simulate the competition switch using the “comp switch” debug window or use this.

Without a competition switch (or the simulation) connected then only the driver code will run.
CompMenu.jpg

The OP might also be asking this question, its hard to tell.

We use RobotC. We are going to a Vex Competition.
We want to participate in the normal game: Auton(20s) & Driver(120s).
We want to participate in RobotSkills: Driver(60s)
We want to participate in Programming Skills: Auton(60s)
Can we do all that in RobotC without reloading the cortex?

Yes, you may be right, sometimes the questions on this forum are very ambiguous. There are several solutions to this problem but before describing them perhaps the OP can comment, then we can provide additional help if needed.