1. Just before a match, you will find a cable at the driver station that plugs into the Competition port on your OI. This is how FIRST tells your robot to go into autonomous at the start of a match, and to switch to driver control later on. FIRST can also disable your robot remotely if they deem it necessary.
2. In user_routines_fast.c, you will find the following block of code:
Code:
while (autonomous_mode)
{
if (statusflag.NEW_SPI_DATA)
{
Getdata(&rxdata); // bad things will happen if you move or delete this
// Autonomous code goes here.
Generate_Pwms(pwm13,pwm14,pwm15,pwm16);
Putdata(&txdata); // even more bad things will happen if you mess with this
}
}
If you put your autonomous code where it says "Autonomous code goes here", your code will execute in autonomous mode, and switch to driver control at the appropriate time. Good luck with your programming.