Hello peeps first time doing the autonomous in first but doing it for really long now. have a couple question that you guys might be ables to help me on
Do we need something on the robot or the controls that is like a switch that will allow you to switch to human controls ones the autonomous is done, or once it is done the control is now turn over to the human or how does the robot know to switch from the autonomous to Drivers Control
And how do i set up autonomous so that the when the period starts it actually works. Yes i know someone reading this say what they guy being doing in first but i was mechanical and website in HS and wiring not autonomous
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.
In user_routines_fast.c, you will find the following block of 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.