예제 #1
0
파일: move.py 프로젝트: biggreenogre/drubot
 def GET(self, path):
     if path == 'forward':
         runRobot.run(1,100,0)
         message = "Robot moving " + path + "\n"
     elif path == 'backward':
         runRobot.run(1,-100,0)
         message = "Robot moving " + path + "\n"
     elif path == 'left':
         runRobot.run(0.75,100,-100)
         message = "Robot turning " + path + "\n"
     elif path == 'right':
         runRobot.run(0.75,100,100)
         message = "Robot turning " + path + "\n"
     else:
         message = "ERROR: Unknown direction \"" + path + "\"\n"
     return message
예제 #2
0
def backward(runtime=1, power=-100, turn=0):
    runRobot.run(runtime, power, turn)
예제 #3
0
def forward(runtime=1, power=100, turn=0):
    runRobot.run(runtime, power, turn)
예제 #4
0
def left(runtime=1, power=-100, turn=0):
    runRobot.run(runtime=0.75, power=100, turn=-100) 
예제 #5
0
파일: move.py 프로젝트: biggreenogre/drubot
 def POST(self):
     form = self.form()
     if not form.validates():
         return render.new(form)
     runRobot.run(self.runTime,100,0)
     raise web.seeother('/runrobot')