How to mix autonomous code with default code

Dear Vex Forum:

We already have the autonomous code written. How do we mix the default code with the autonomous code, load them as separate programs?

We have a switch remote if needed.

Thank you,
St. Catharine Comets
Connie & Adwoa programmers

Put the auton code into a function, and run it during auton mode. Are you using the competition template?

Yes, we are using a competition template, this is our very 1st competition.
We have the switch remote to go back and forth from autonomous to default code. We have potentialometers to use as a counter for our autonomous mode.

We don’t know how to put these together and run it?! We need help!

Thanks, Connie

Can you be more specific of your problem? Then we can help you better.

Do you want example code or the gist of how it work?

The most fundamental question is

EasyC or ROBOTC?

And what is a switch remote…?

I’m guessing that’s the competition switch.

As I am also a programmer, I think I might help.
First, what exactly do you want to achieve? Please be specific. For example, we’ve already compiled our codes into a competition project, it runs autonomous codes for 15 secs and then applies driver control loop for 90 secs. Is this what you are trying to do?
Also, I am not familiar with your potentialmeter counter. Please describe it.