TETRIX FTC Templates
(→FTC Templates) |
|||
| Line 4: | Line 4: | ||
{| | {| | ||
|- | |- | ||
| − | | 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: | + | | 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.): |
<ul><li><em>New File</em> - Creates a blank ROBOTC file.</li> | <ul><li><em>New File</em> - Creates a blank ROBOTC file.</li> | ||
<li><STRONG>Autonomous Template</STRONG> - Creates a FTC Autonomous Template (used for the autonomous portion of the competition.</li> | <li><STRONG>Autonomous Template</STRONG> - Creates a FTC Autonomous Template (used for the autonomous portion of the competition.</li> | ||
<li><STRONG>User Control Template</STRONG> - Creates a FTC User Control Template (used for the autonomous portion of the competition.</li></ul> | <li><STRONG>User Control Template</STRONG> - Creates a FTC User Control Template (used for the autonomous portion of the competition.</li></ul> | ||
|- | |- | ||
| − | |||
|} | |} | ||
Revision as of 11:18, 11 September 2012
TETRIX → 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. } } |} <br /> |
