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)
| 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 | """ |
no test coverage detected