Programming instructions

ROBOTC
ROBOTC Programming - Competition Templates 1
©
2011 Carnegie Mellon Robotics Academy / For use with VEX Robotics Systems
ROBOTC Programming Competition Templates
1. OpenROBOTC for Cortex and PIC.
1. Open ROBOTC for Cortex and PIC
OpenROBOTC for Cortex and PIC
fromyourDesktoporStartMenu.
This document is part of a software inspection guide for VEX based robots. Use this document to
learn how to use the “Competition Template” or “Driver Skills Template” included with ROBOTC.
For the most up-to-date versions of the templates (and ROBOTC) download the latest
version of ROBOTC for Cortex and PIC at www.robotc.net.
Youwillneed:
• AcomputerwithROBOTCforCortexandPIC2.32orlaterinstalled(availableatwww.robotc.net)
Part I. Using the ROBOTC Competition Template
2. TobeginprogramminginaCompetitionTemplate,gotoFile>New...andselectCompetition Template.
task main()
{
//User code goes here
}
Normal Programming vs. Competition Programming
InROBOTC,everyprogramisusuallybasedaroundtask main(),asshownbelow:
InaVEXcompetition,however,therobotsneedtocommunicatewiththeeldcontrolsystem,so
programmingisalittledifferent.Tokeepthingssimple,ROBOTCcomeswithbuilt-inCompetition
andDriverSkillstemplates.Thetemplatescontainsthreemainsections,eachmappedtospecic
portionsofthecompetition,whereteamsshouldplacetheircode.
VEX ROBOTICS COMPETITION