Cortex VEXnet Manuel d'instructions Page 85

  • 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 84
RO BOTC
Reference
Reserved Words 4
©
Carnegie Mellon Robotics Academy / For use with VEX
®
Robotics Systems
Reserved Words
bVexAutonomousMode = false; //enable radio control
while(true)
{
motor[port3] = vexRT[Ch3]; //right joystick, y-axis
//controls the motor on port 3
motor[port2] = vexRT[Ch2]; //left joystick, y-axis
//controls the motor on port 2
}
Radio Control
ROBOTC allows you to control your robot using input from the Radio Control Transmitter.
bVexAutonomousMode
Set the value to either 0 for radio enabled or 1 for radio disabled (autonomous mode). You can
also use “true” for 1 and “false” for 0.
Control Port Joystick Channel Possible Values
Right Joystick, X-axis Ch1 -127 to 127
Right Joystick, Y-axis Ch2 -127 to 127
Left Joystick, Y-axis Ch3 -127 to 127
Left Joystick, X-axis Ch4 -127 to 127
Left Rear Buttons Ch5 -127, 0, or 127
Right Rear Buttons Ch6 -127, 0, or 127
Control Port Joystick Channel Possible Values
Right Joystick, X-axis Ch1Xmtr2 -127 to 127
Right Joystick, Y-axis Ch2Xmtr2 -127 to 127
Left Joystick, Y-axis Ch3Xmtr2 -127 to 127
Left Joystick, X-axis Ch4Xmtr2 -127 to 127
Left Rear Buttons Ch5Xmtr2 -127, 0, or 127
Right Rear Buttons Ch6Xmtr2 -127, 0, or 127
If the RF receiver is plugged into Rx 2, the following values apply:
vexRT[joystick_channel]
This command retrieves the value of the specied channel being transmitted.
If the RF receiver is plugged into Rx 1, the following values apply:
bVexAutonomousMode = 0; //enable radio control
bVexAutonomousMode = 1; //disable radio control
Vue de la page 84
1 2 ... 80 81 82 83 84 85 86 87 88 89 90 ... 94 95

Commentaires sur ces manuels

Pas de commentaire