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()