Created
November 10, 2017 12:59
-
-
Save fernandolopez/ba25090fc2b5d21d4beecb5e89a494da to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from xremotebot import * | |
import time | |
server = Server('ws://163.10.20.156:8000/api') | |
robot = Robot(server, server.reserve('n6', 6)) | |
robot.forward(50, 1) | |
for i in range(20): | |
if robot.getObstacle(20): | |
robot.backward(50,1) | |
robot.turnLeft(50,.5) | |
robot.forward(80) | |
time.sleep(1) | |
robot.stop() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment