MCPcopy Create free account
hub / github.com/DexterInd/GoPiGo3 / init_servo

Method init_servo

Software/Python/easygopigo3.py:1097–1109  ·  view source on GitHub ↗

Initialises a :py:class:`~easysensors.Servo` object and then returns it. :param str port = "SERVO1": Can be either ``"SERVO1"`` or ``"SERVO2"``. By default it's set to be ``"SERVO1"``. :returns: An instance of the :py:class:`~easysensors.Servo` class and with the port set t

(self, port = "SERVO1")

Source from the content-addressed store, hash-verified

1095 return lf
1096
1097 def init_servo(self, port = "SERVO1"):
1098 """
1099 Initialises a :py:class:`~easysensors.Servo` object and then returns it.
1100
1101 :param str port = "SERVO1": Can be either ``"SERVO1"`` or ``"SERVO2"``. By default it's set to be ``"SERVO1"``.
1102 :returns: An instance of the :py:class:`~easysensors.Servo` class and with the port set to ``port``'s value.
1103
1104 The ``"SERVO1"`` and ``"SERVO2"`` ports are mapped to the following :ref:`hardware-ports-section`.
1105
1106 The ``use_mutex`` parameter of the :py:meth:`~easygopigo3.EasyGoPiGo3.__init__` constructor is passed down to the constructor of :py:class:`~easysensors.Servo` class.
1107
1108 """
1109 return easysensors.Servo(port, self, use_mutex=self.use_mutex)
1110
1111 def init_distance_sensor(self, port = "I2C"):
1112 """

Callers 2

obstacleFinderFunction · 0.95
__init__Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected