Asked — Edited
Resolved Resolved by Steve G!

Writing Script For Multiple Servos At The Same Time

Don't laugh too hard...I'm a noob learning how servos work for the first time. I am just learning how to script with ARC manually... Working with an inMOOV robotic arm/hand.

I have a script that moves 5 servos - 1 at a time for each finger. The script looks like this... SetServoMin(D0,1) SetServoMax(D0,160) SetServoMin(D1,1) SetServoMax(D1,160) SetServoMin(D2,1) SetServoMax(D2,160) SetServoMin(D3,1) SetServoMax(D3,160) SetServoMin(D4,1) SetServoMax(D4,160) Servo(D0,1) Sleep(500) Servo(D0,160) Sleep(500) Servo(D0,1) Sleep(500) Servo(D0,160) Sleep(500) Servo(D0,1) Sleep(500) Servo(D0,160) Sleep(500) Servo(D0,1) Sleep(500) Servo(D1,1) Sleep(500) Servo(D1,160) Sleep(500) Servo(D1,1) Sleep(500) Servo(D1,160) Sleep(500) Servo(D1,1) Sleep(500) Servo(D1,160) Sleep(500) Servo(D1,1) sleep(500) Servo(D2,1) Sleep(500) Servo(D2,160) Sleep(500) Servo(D2,1) Sleep(500) Servo(D2,160) Sleep(500) Servo(D2,1) Sleep(500) Servo(D2,160) Sleep(500) Servo(D2,1) Sleep(500) Servo(D3,1) Sleep(500) Servo(D3,160) Sleep(500) Servo(D3,1) Sleep(500) Servo(D3,160) Sleep(500) Servo(D3,1) Sleep(500) Servo(D3,160) Sleep(500) Servo(D3,1) Sleep(500) Servo(D4,1) Sleep(1000) Servo(D4,160) Sleep(1000) Servo(D4,1) Sleep(500) Servo(D4,160) Sleep(500) Servo(D4,1) Sleep(500) Servo(D4,160) Sleep(500) Servo(D4,1) Sleep(500)

How can I get all 5 servos to move at the same time? Is there a way to execute 5 commands at the same time from the same script on the same line? Can someone give me a short example? I want the robot to close his hand and then open his hand...or maybe open two fingers while 3 are closed.

Any help would be appreciated so I can see how this might be accomplished. Thanks! BobJ


ARC Pro

Upgrade to ARC Pro

Harnessing the power of ARC Pro, your robot can be more than just a simple automated machine.

#17  

@bobjacon This is how I did my finger servos.... I used screws like guitar tuning pegs... I can adjust tension simply by turning any one of the screws...

User-inserted image

#18  

Richard R, What a GREAT idea! Can you point me to a source as to where someone can find screws like that? I don't even know what to call them but that would solve that problem pretty well.

BobJ

#19  

@bobjacon Ha, ha.... #4 x 3/8 wood screws from the Home Depot.... you need some crazy glue as you wrap the braided line around the screws... This will keep it from slipping when you turn the screw...

#20  

Richard R,

LOL!

You had me thinking that there was a small screw with a hole through it like tuning peg available someplace!

However, thanks for describing what you mean...it will do the same thing! BobJ