Vex CORTEX Bedienerhandbuch Seite 113

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 166
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 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
Seitenansicht 112
1 2 ... 108 109 110 111 112 113 114 115 116 117 118 ... 165 166

Kommentare zu diesen Handbüchern

Keine Kommentare