Skip to content

Instantly share code, notes, and snippets.

@ferclaverino
Created November 4, 2013 18:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ferclaverino/7307445 to your computer and use it in GitHub Desktop.
Save ferclaverino/7307445 to your computer and use it in GitHub Desktop.
from time import sleep
from braianDriver.robot import Robot
robot = Robot()
def adelante(cuanto):
robot.set_forward()
robot.move(speed=Robot.SPEED_MEDIUM)
sleep(cuanto)
robot.stop()
def atras(cuanto):
robot.set_backward()
robot.move(speed=Robot.SPEED_MEDIUM)
sleep(cuanto)
robot.stop()
def girar_izquierda(cuanto):
robot.set_rotate_left()
robot.move(speed=Robot.SPEED_LOW)
sleep(cuanto)
robot.stop()
def girar_derecha(cuanto):
robot.set_rotate_right()
robot.move(speed=Robot.SPEED_LOW)
sleep(cuanto)
robot.stop()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment