示例#1
0
def iteration():
    print("iteration entry")

    # Get twin motors
    twins = motor.Twin(motor.portA, motor.portB)

    # Prepare movement and move 50 cm
    movement = move.Gradual(2 * math.pi * radius)
    movement.move(twins, -50)
示例#2
0
def iteration2():
    print("iteration entry")

    # Get twin motors
    twins = motor.Twin(motor.portA, motor.portB)

    # Prepare movement
    movement = move.Gradual(circ)

    # Move forward by 50 cm and back
    movement.move(twins, -50)
    movement.move(twins, 50)