Cortex VEXnet Manuel d'instructions Page 34

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 95
  • Table des matières
  • DEPANNAGE
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 33
ROBOTC
ROBOTC Programming - Competition Templates 4
©
2011 Carnegie Mellon Robotics Academy / For use with VEX Robotics Systems
Pre-Autonomous Period
Placeyourinitializationcodeinsidethisfunction.Duringthepre-autonomousperiod,codecanbe
executedtocongureyourrobotbeforetheactualcompetitionbegins.Validcodeforthissection
includestaskssuchasclearingencoders,reectingmotors,andsettinginitialservopositions.
Note: Thiscodeexecutesonlyonceandrunsbeforethecompetitionbegins.
void pre_autonomous()
{
//Place pre-autonomous code here
}
ROBOTC Programming Competition Templates (cont.)
task autonomous()
{
//Place autonomous code here
AutonomousCodePlaceholderForTesting();
}
Autonomous Period
Placeyourautonomouscodeinsidethistask.Duringtheautonomousperiod,therobotperformsthe
pre-programmedactionsonce,oruntilitisdisabledbytheeldcontrolsystem(orforthelengthof
timespeciedintheautonomousDuration(time)pragmastatement,forVEXPICbasedrobots
usingthe75MHzCystals).TheAutonomousCodePlaceholderForTesting();functionisonlya
placeholderandshould be replacedwithyourowncode.
VEXPICbasedrobotsusingthe75MHzCrystalscannotacceptcommandsfromtheRadioControl
Transmitterduringtheautonomousperiod,buttheyrequirethatthesignalbepresentasasafety
precaution.Theautonomousperiodduringacompetitioncannotbeskippedbyshuttingthetransmitteroff;
doingsowitharobotusingthe75MHzcrystalswillpausetheVEX’sinternaltimers,potentiallycausingthe
robottoentertheUserControlperiodlaterthanitshould.
AlsonotethattheAutonomousCodePlaceholderForTesting();functioncontainsawhile(true)
loopthatcanpreventuser-writtenautonomouscodefromexecuting.Removethisfunctiontoavoidany
unexpectedbehaviorduringtheautonomousperiod.
Important Information - Transmitter Signal
VEX ROBOTICS COMPETITION
Vue de la page 33
1 2 ... 29 30 31 32 33 34 35 36 37 38 39 ... 94 95

Commentaires sur ces manuels

Pas de commentaire