Vex CORTEX Manual de Instruções Página 113

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 166
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 112
Reference
Project Lead The Way
©
and Carnegie Mellon Robotics Academy
©
/ For use with VEX
®
Robotics Systems
Servo Motors 2
motor[port6] = -127; //Set position fully backward
wait1Msec(1000); //Wait for 1 second
motor[port6] = -95; //Set position 3/4 backward
wait1Msec(1000); //Wait for 1 second
motor[port6] = -63; //Set position 1/2 backward
wait1Msec(1000); //Wait for 1 second
motor[port6] = -31; //Set position 1/4 backward
wait1Msec(1000); //Wait for 1 second
motor[port6] = 0; //Set position to middle
wait1Msec(1000); //Wait for 1 second
motor[port6] = 31; //Set position 1/4 forward
wait1Msec(1000); //Wait for 1 second
motor[port6] = 63; //Set position 1/2 forward
wait1Msec(1000); //Wait for 1 second
motor[port6] = 95; //Set position 3/4 forward
wait1Msec(1000); //Wait for 1 second
motor[port6] = 127; //Set position fully forward
wait1Msec(1000); //Wait for 1 second
Servo Motors Sample Code
Rotating the Servo Modules Shaft to Different Positions
This code rotates a Servo Module on MOTOR Port 6 to a different position every second,
starting at -127 (fully backward) and ending at 127 (fully forward).
Go to Reference Links
Vista de página 112
1 2 ... 108 109 110 111 112 113 114 115 116 117 118 ... 165 166

Comentários a estes Manuais

Sem comentários