KSR10 USB Python controller Wiki
Control the KSR10 Robot Arm (Velleman) through USB with Python.
Status: Beta
Brought to you by:
nielsbosboom
This example shows basic control of the robot arm.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | #!/usr/bin/python import ksr10 import time # create object ksr = ksr10.ksr10.ksr10_class() # turn on lights ksr.lights() # move base of the arm to the left ksr.move("base","left") # wait 0.5 second time.sleep(.5) # stop all movement ksr.stop() # move base to the right and # elbow up simultaneously ksr.move("base","right") ksr.move("elbow","up") # wait 0.5 second time.sleep(.5) # stop all movement ksr.stop() # turn off lights ksr.lights() |