TETRIX FTC Templates
From ROBOTC API Guide
(→User Control Template) |
|||
| Line 55: | Line 55: | ||
} | } | ||
} | } | ||
| − | + | </syntaxhighlight> | |
|} | |} | ||
<br /> | <br /> | ||
Latest revision as of 12:17, 20 November 2012
TETRIX → FTC Templates
|
FTC Templates
ROBOTC has built-in FTC templates that can be used to quickly and easily program a robot for both the autonomous and tele-op (remote control) portions of a competition. To open a template through ROBOTC, navigate to the File menu and select "New". There are three options under this menu (for FTC competitions we want to focus on the latter two options, Autonomous Template and User Control Template):
|
Autonomous Template
User Control Template
The User Control Template is exactly the same as the Autonomous template with one small (but crucial) difference. Inside of the User Control Template's task main() there is a infinite loop that all the User Control code should go inside of. This loop allows user control code to run until the FCS stops the match.
task main() { initializeRobot(); waitForStart(); while(true) { //User Control code goes here. } } |
