def __init__(self, port='A', speed=100, **kwargs): self.port = port self.speed = speed self.test_direction = 1 self.motor = MediumMotor(port=self.port) self.motor.reset() self.task_state = None
def test_medium_motor(self): get_input('Attach a MediumMotor then continue') d = MediumMotor() print(d.type) d.run_forever(100, regulation_mode=False) print(d.run) time.sleep(5) d.stop()
def test_medium_motor(self): get_input('Attach a MediumMotor then continue') d = MediumMotor() print(d.driver_name) d.run_forever(100, speed_regulation=False) print(d.state) time.sleep(5) d.stop()
def __init__(self): self.ir = InfraredSensor() self.color = ColorSensor() self.left_track = LargeMotor(Motor.PORT.D) self.right_track = LargeMotor(Motor.PORT.A) self.mouth = MediumMotor(Motor.PORT.B) self.key = Key() self.led = LED() self.reset_leds()