Files
Roboteksperimentarium/infinity_loop.py
NikolajDanger 9111deb81b
2022-09-07 14:30:03 +02:00

32 lines
508 B
Python

from time import sleep
import robot
DRIVE_T = 0.22 # 10 centimeter
def loop(arlo):
while True:
arlo.go_diff(121, 42, 1, 1)
sleep(DRIVE_T * 19)
arlo.stop()
sleep(0.1)
arlo.go_diff(40, 127, 1, 1)
sleep(DRIVE_T * 19)
arlo.stop()
sleep(0.1)
def main():
# Initializes the robot and runs the
arlo = robot.Robot()
try:
loop(arlo)
except KeyboardInterrupt:
arlo.stop()
if __name__ == "__main__":
main()