# ~ move.backward(0.5) # ~ print("Jetbot is moving backward!") # ~ elif (joy.X()): # ~ move.left(1) # ~ move.stop() # ~ move.forward(0.5) # ~ print("Jetbot is turning left!") # ~ elif (joy.B()): # ~ move.right(1) # ~ move.stop() # ~ move.forward(0.5) # ~ print("Jetbot is turning right!") # ~ elif (joy.Start()): # ~ move.stop() if (joy.leftY()): move.forward(0.5) print("Jetbot is moving foward!") elif (joy.rightY()): move.backward(0.5) print("Jetbot is moving backward!") elif (joy.leftX()): move.left(1) move.stop() move.forward(0.5) print("Jetbot is turning left!") elif (joy.rightX()): move.right(1) move.stop() move.forward(0.5) print("Jetbot is turning right!") elif (joy.Start()):
from jetbot import Robot import time robot = Robot() robot.forward(0.9) time.sleep(1.0) #1 second robot.stop()