This commit is contained in:
NikolajDanger
2022-09-07 13:12:05 +02:00
parent 2139ca510b
commit 943855b784

View File

@ -3,6 +3,7 @@ import robot
POWER = 70
TURN_T = 0.079 # 10 degrees turn at given power
CLOCKWISE_OFFSET = 0.96
def main():
turn_degrees = int(input(":"))
@ -10,8 +11,8 @@ def main():
# Initializes the robot and runs the
arlo = robot.Robot()
arlo.go_diff(POWER, POWER, 0, 1)
sleep(TURN_T * (turn_degrees/10))
arlo.go_diff(POWER, POWER, 1, 0)
sleep(TURN_T * (turn_degrees/10) * CLOCKWISE_OFFSET)
arlo.stop()