Returns the name of the port that this motor is connected to.
Sets the command for the servo. Valid values are run
and float
. Setting
to run
will cause the servo to be driven to the position_sp set in the
position_sp
attribute. Setting to float
will remove power from the motor.
Returns the name of the motor driver that loaded this device. See the list of [supported devices] for a list of drivers.
Used to set the pulse size in milliseconds for the signal that tells the servo to drive to the maximum (clockwise) position_sp. Default value is 2400. Valid values are 2300 to 2700. You must write to the position_sp attribute for changes to this attribute to take effect.
Used to set the pulse size in milliseconds for the signal that tells the servo to drive to the maximum (clockwise) position_sp. Default value is 2400. Valid values are 2300 to 2700. You must write to the position_sp attribute for changes to this attribute to take effect.
Used to set the pulse size in milliseconds for the signal that tells the servo to drive to the mid position_sp. Default value is 1500. Valid values are 1300 to 1700. For example, on a 180 degree servo, this would be 90 degrees. On continuous rotation servo, this is the 'neutral' position_sp where the motor does not turn. You must write to the position_sp attribute for changes to this attribute to take effect.
Used to set the pulse size in milliseconds for the signal that tells the servo to drive to the mid position_sp. Default value is 1500. Valid values are 1300 to 1700. For example, on a 180 degree servo, this would be 90 degrees. On continuous rotation servo, this is the 'neutral' position_sp where the motor does not turn. You must write to the position_sp attribute for changes to this attribute to take effect.
Used to set the pulse size in milliseconds for the signal that tells the servo to drive to the miniumum (counter-clockwise) position_sp. Default value is 600. Valid values are 300 to 700. You must write to the position_sp attribute for changes to this attribute to take effect.
Used to set the pulse size in milliseconds for the signal that tells the servo to drive to the miniumum (counter-clockwise) position_sp. Default value is 600. Valid values are 300 to 700. You must write to the position_sp attribute for changes to this attribute to take effect.
Sets the polarity of the servo. Valid values are normal
and inversed
.
Setting the value to inversed
will cause the position_sp value to be
inversed. i.e -100
will correspond to max_pulse_sp
, and 100
will
correspond to min_pulse_sp
.
Sets the polarity of the servo. Valid values are normal
and inversed
.
Setting the value to inversed
will cause the position_sp value to be
inversed. i.e -100
will correspond to max_pulse_sp
, and 100
will
correspond to min_pulse_sp
.
Reading returns the current position_sp of the servo. Writing instructs the
servo to move to the specified position_sp. Units are percent. Valid values
are -100 to 100 (-100% to 100%) where -100
corresponds to min_pulse_sp
,
0
corresponds to mid_pulse_sp
and 100
corresponds to max_pulse_sp
.
Reading returns the current position_sp of the servo. Writing instructs the
servo to move to the specified position_sp. Units are percent. Valid values
are -100 to 100 (-100% to 100%) where -100
corresponds to min_pulse_sp
,
0
corresponds to mid_pulse_sp
and 100
corresponds to max_pulse_sp
.
Sets the rate_sp at which the servo travels from 0 to 100.0% (half of the full
range of the servo). Units are in milliseconds. Example: Setting the rate_sp
to 1000 means that it will take a 180 degree servo 2 second to move from 0
to 180 degrees. Note: Some servo controllers may not support this in which
case reading and writing will fail with -EOPNOTSUPP
. In continuous rotation
servos, this value will affect the rate_sp at which the speed ramps up or down.
Sets the rate_sp at which the servo travels from 0 to 100.0% (half of the full
range of the servo). Units are in milliseconds. Example: Setting the rate_sp
to 1000 means that it will take a 180 degree servo 2 second to move from 0
to 180 degrees. Note: Some servo controllers may not support this in which
case reading and writing will fail with -EOPNOTSUPP
. In continuous rotation
servos, this value will affect the rate_sp at which the speed ramps up or down.
Returns a list of flags indicating the state of the servo. Possible values are:
running
: Indicates that the motor is powered.Generated using TypeDoc
The servo motor class provides a uniform interface for using hobby type servo motors.