from time import sleep import robot POWER = 127 TURN_T = 0.079 # 10 degrees DRIVE_T = 0.22 # 10 centimeter RIGHT_WHEEL_OFFSET = 4 CLOCKWISE_OFFSET = 0.82 def loop(arlo): while True: arlo.go_diff(POWER, 43, 1, 1) sleep(DRIVE_T * 17) arlo.stop() arlo.go_diff(41, POWER, 1, 1) sleep(DRIVE_T * 17) arlo.stop() def main(): # Initializes the robot and runs the arlo = robot.Robot() try: loop(arlo) except KeyboardInterrupt: arlo.stop() if __name__ == "__main__": main()