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

Method set_speed

Software/Python/easygopigo3.py:236–257  ·  view source on GitHub ↗

This method sets the speed of the `GoPiGo3`_ specified by ``in_speed`` argument. The speed is measured in *DPS = degrees per second* of the robot's wheel(s). :param int in_speed: The speed at which the robot is set to run - speed between **0-1000** DPS. .. warning

(self, in_speed)

Source from the content-addressed store, hash-verified

234 return voltage
235
236 def set_speed(self, in_speed):
237 """
238 This method sets the speed of the `GoPiGo3`_ specified by ``in_speed`` argument.
239
240 The speed is measured in *DPS = degrees per second* of the robot's wheel(s).
241
242 :param int in_speed: The speed at which the robot is set to run - speed between **0-1000** DPS.
243
244 .. warning::
245
246 **0-1000** DPS are the *preferred* speeds for the `GoPiGo3`_ robot.
247 The speed variable can be basically set to any positive value, but factors like *voltage*, *load*, *battery amp rating*, etc, will determine the effective speed of the motors.
248
249 Experiments should be run by every user, as each case is unique.
250
251 """
252 try:
253 self.speed = int(in_speed)
254 except:
255 self.speed = self.DEFAULT_SPEED
256 self.set_motor_limits(self.MOTOR_LEFT + self.MOTOR_RIGHT,
257 dps=self.speed)
258
259 def get_speed(self):
260 """

Callers 10

robotControllerFunction · 0.95
MainFunction · 0.95
robotControlFunction · 0.95
__init__Method · 0.95
reset_speedMethod · 0.95
orbitMethod · 0.95
robot_commandsFunction · 0.80
robot_server.pyFile · 0.80
set_speedFunction · 0.80
hardware_test.pyFile · 0.80

Calls 1

set_motor_limitsMethod · 0.45

Tested by

no test coverage detected