Programming instructions
ROBOTC
ROBOTC Programming - Competition Templates • 5
©
2011 Carnegie Mellon Robotics Academy / For use with VEX Robotics Systems
User Control Period
Placeyourusercontrolcodeinsidethistask.Duringtheusercontrolledperiod,therobotaccepts
commandsfromtheVEXnetJoysticks(VEXCortexbasedrobots)ortheRadioControlTransmitter(VEXPIC
basedrobots).Thissegmentofcodetypicallyexecutesimmediatelyaftertheautonomousperiodends.
TheUserControlCodePlaceholderForTesting();functionisonlyaplaceholderandshouldbe
removedonceyouplaceyourowncodeinsideofthewhile(true)loop.
task usercontrol()
{
while(true)
{
//Place user control code here
UserControlCodePlaceholderForTesting();
}
}
Whenprogrammingfortheusercontrolperiod,placeallcommandsinsideofthewhile(true)loop.Failing
todosowillresultinthecommandsonlyrunningonce,preventingyoufromremotelycontrollingyourrobot.
Theeldcontrolsystemdeterminesandcontrolsthemaximumlengthoftheusercontrolperiod.
Important Information - while(true) loop
ROBOTC Programming Competition Templates (cont.)
VEX ROBOTICS COMPETITION