Vex CORTEX Manual de instrucciones Pagina 113

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 166
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 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 pagina 112
1 2 ... 108 109 110 111 112 113 114 115 116 117 118 ... 165 166

Comentarios a estos manuales

Sin comentarios