V5 competition code setup (V5 Text)

I’m new to V5 and I’m not sure how to set up the code for competition

In robotC, you just create functions called pre_auton, autonomous and driver, but how do you do it in V5?

currently, doing a int main() works for testing, but I don’t want to goof up in the competition. I also don’t have the robot with me right now so I can’t do any testing. I’ve done some playing around but it always come up with errors and I’m pretty sure I’m doing it completely wrong,

the documentation says:

autonomous()

void vex::competition::autonomous ( void(*)(void) callback )

I have no idea what to put in it, can anyone please give an example or something like that, any help would be appreciated :slight_smile:

well so the initialize funtion is where you put code to run before anything else runs, and disabled, opcontrol and autonomous is acctivated according to the field switch. however, if no field swith is connected, opcontrol will be runned.

There should be a competition template you can use when you create the project.
It looks very similar to RobotC.

2 Likes

ah yes thanks I didn’t see that option when I created the project
thanks!