Vex CORTEX Instrukcja Obsługi Strona 113

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 166
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 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
Przeglądanie stron 112
1 2 ... 108 109 110 111 112 113 114 115 116 117 118 ... 165 166

Komentarze do niniejszej Instrukcji

Brak uwag