Files
Roboteksperimentarium/turn_test.py
NikolajDanger 943855b784
2022-09-07 13:12:05 +02:00

21 lines
386 B
Python

from time import sleep
import robot
POWER = 70
TURN_T = 0.079 # 10 degrees turn at given power
CLOCKWISE_OFFSET = 0.96
def main():
turn_degrees = int(input(":"))
# Initializes the robot and runs the
arlo = robot.Robot()
arlo.go_diff(POWER, POWER, 1, 0)
sleep(TURN_T * (turn_degrees/10) * CLOCKWISE_OFFSET)
arlo.stop()
if __name__ == "__main__":
main()