Is it possible to trigger an autonomous program without a controller?
i was warned in a non-vex competition that i couldn’t sync the controller with the cortex to trigger autonomous. Is there another way to trigger the autonomous period? I’m allowed to use sensors and interact with the robot like in gateway and sack attack
I’m not using the competition template currently. Right now, i just use task main and run off of timer loops:
So with this format, i need to turn on both the controller and cortex in order for the autonomous to run(i think:confused:). Without both the controller and cortex on and connected, the robot wont run. However motors spin without vexnet when i compile code.
would i have to swap task main for something like task autonomous? Or do i need to create a while loop using that phrase or something? I only have maybe a days worth of self taught programming experience so i’m not that familiar with all the terminology…:o
Don’t change the task name–ROBOTC needs a “task main” to run. I don’t have my VEX stuff right now (it’s all in storage for a while), but if I recall correctly, all you need is to place that statement like so:
bIfiAutonomousMode = true;
Basically, the bIFIAutonomousMode variable tells the robot “when I’m set to true, don’t worry about what the VEXnet controller is doing, just run the code.”
Not sure I understand what you want to do. If the joystick is connected and you are using a competition template without field control then the usercontrol() task will be run. If you want to trigger an autonomous function from there just detect a switch (in a digital port on the robot for example) and run the autonomous code.
Ok, so your code just goes in the “main” task. To run the code without the controller connected (no VEXnet etc) download as “USBonly” under the Robot->VEX cortex communication mode menu. Code should start when cortex is powered up.
I checked, it is read only on the cortex. It’s set by information received from the master processor along with the joystick values and disabled status. I’ve never used the PIC controller, but the switch to the cortex pretty much changed everything as I understand it.