1
0
Fork 0

include an python activity example

This commit is contained in:
Kevin Matz 2019-07-31 08:54:03 -04:00
parent eda20cf4cd
commit a2c58dcb51
2 changed files with 34 additions and 6 deletions

View File

@ -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)
```

27
activity_3.py Executable file
View File

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