add stop option
This commit is contained in:
parent
952c776dae
commit
45991bf050
5
nexus.py
5
nexus.py
|
|
@ -31,6 +31,9 @@ class NexusRobot:
|
||||||
self.ser.write("rl%d,%d;" % (speed, angle))
|
self.ser.write("rl%d,%d;" % (speed, angle))
|
||||||
self._wait()
|
self._wait()
|
||||||
|
|
||||||
|
def stop(self, speed=0):
|
||||||
|
self.ser.write("s%d;" % (speed))
|
||||||
|
self._wait()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -51,4 +54,4 @@ robot.pause()
|
||||||
robot.forward(200,10)
|
robot.forward(200,10)
|
||||||
robot.pause()
|
robot.pause()
|
||||||
robot.turnRight(200,90)
|
robot.turnRight(200,90)
|
||||||
robot.pause()
|
robot.pause()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue