Σερβοκινητήρας#

Εισαγωγή#

Ο 3-wire Servo Motor VEX είναι μια συσκευή 3-wire που μπορεί να περιστραφεί σε μια συγκεκριμένη θέση με βάση ένα σήμα ελέγχου από τον EXP Brain.

Ο σερβοκινητήρας EDR VEX

This page uses servo_motor as the example Servo Motor name. Replace it with your own configured name as needed.

Παρακάτω είναι μια λίστα με τις διαθέσιμες μεθόδους:

  • set_position – Moves a Servo Motor to a specified position between 0 and 100 degrees.

Κατασκευαστής – Χειροκίνητη αρχικοποίηση ενός σερβοκινητήρα.

  • Servo – Creates a Servo Motor.

ορισμός_θέσης#

set_position moves a Servo Motor to a specified position between 0 and 100 degrees.

Σημείωση: Ένας σερβοκινητήρας ξεκινά κάθε έργο κεντράροντας αυτόματα στις 50 μοίρες πριν ολοκληρώσει οποιαδήποτε κίνηση.

Ένα διάγραμμα ενός σερβοκινητήρα που δείχνει τις μοίρες που μπορεί να περιστραφεί, από 100 έως 0 μοίρες.

Usage:
servo_motor.set_position(value, units)

Παράμετροι

Περιγραφή

value

The position value to set for the Servo Motor. This can be an integer or decimal (float) from 0 to 100.

units

The position unit: DEGREES or PERCENT (default).

Κατασκευαστές#

Constructors are used to manually create Servo objects, which are necessary for configuring a Servo Motor outside of VEXcode.

Servo#

Servo creates a Servo Motor.

Usage:
Servo(port)

Παράμετρος

Περιγραφή

port

The 3-Wire Port that the Servo Motor is connected to:

  • On the EXP BrainPorts.PORTx where x is the number of the port.
  • On a 3-Wire Expanderexpander.a where expander is the name of the expander instance.

# Create a Servo Motor in Port A
servo_motor = Servo(brain.three_wire_port.a)