21 lines
386 B
Python
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()
|