def __init__(self,
              left_wheel_port=ev3.OUTPUT_B,
              right_wheel_port=ev3.OUTPUT_C):
     """
     A DriveSystem has   self.left_wheel   and   self.right_wheel.
     """
     self.left_wheel = low_level_rb.Wheel(left_wheel_port)
     self.right_wheel = low_level_rb.Wheel(right_wheel_port)
Beispiel #2
0
    def __init__(self, touch_sensor, port=ev3.OUTPUT_A):
        # The ArmAndClaw's  motor  is not really a Wheel, of course,
        # but it can do exactly what a Wheel can do.
        self.motor = low_level_rb.Wheel(port, is_arm=True)

        # The ArmAndClaw "has" the TouchSensor that is at the back of the Arm.
        self.touch_sensor = touch_sensor
    def __init__(self, touch_sensor, port=ev3.OUTPUT_A):
        # The ArmAndClaw's  motor  is not really a Wheel, of course,
        # but it can do exactly what a Wheel can do.
        self.motor = low_level_rb.Wheel(port, is_arm=True)

        # The ArmAndClaw "has" the TouchSensor that is at the back of the Arm.
        self.touch_sensor = touch_sensor

        # Sets the motor's position to 0 (the DOWN position).
        # At the DOWN position, the robot fits in its plastic bin,
        # so we start with the ArmAndClaw in that position.
        self.calibrate()