include an python activity example
This commit is contained in:
parent
eda20cf4cd
commit
a2c58dcb51
13
README.md
13
README.md
|
@ -58,12 +58,13 @@ go home
|
|||
|
||||
```python
|
||||
#!/usr/bin/env python3
|
||||
import armCtl
|
||||
import armCtl as arm
|
||||
|
||||
command(text)
|
||||
command("go home")
|
||||
|
||||
r.target = [90,120,10,95,90,90]
|
||||
r.move()
|
||||
while r.isMoving():
|
||||
print(r.angle)
|
||||
arm.r.target = [90, 120, 10, 95, 90, 90]
|
||||
arm.r.move()
|
||||
while arm.r.isMoving():
|
||||
pass
|
||||
print(arm.r.angle)
|
||||
```
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import armCtl as arm
|
||||
from time import sleep
|
||||
|
||||
print("waking up the arm")
|
||||
sleep(5)
|
||||
|
||||
print("going to seq_1")
|
||||
arm.command("go seq_1")
|
||||
while arm.r.isMoving():
|
||||
pass
|
||||
print(arm.r.angle)
|
||||
|
||||
print("rotating base +20 degrees")
|
||||
arm.r.target[0] += 20
|
||||
arm.r.move()
|
||||
while arm.r.isMoving():
|
||||
pass
|
||||
print(arm.r.angle)
|
||||
|
||||
print("going to coordinates")
|
||||
arm.r.target = [90, 120, 10, 95, 90, 90]
|
||||
arm.r.move()
|
||||
while arm.r.isMoving():
|
||||
pass
|
||||
print(arm.r.angle)
|
Loading…
Reference in New Issue