Menu

Example 1

Niels Bosboom

Example 1

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()

Related

Wiki: Home

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.