Pololu Robotics & Electronics
Menu
My account Comments or questions? About Pololu Contact Ordering information Distributors

Pololu Forum

Overlapping Servo Movements Smoothly

Hi.
I am trying to make a head servo smoothly turn 90 degrees while blinking its eyes servo. How do I achieve this with the Pololu Maestro Controller as it only gives you the option to do frame by frame and I don’t want the head to stop to blink it’s eyes then continue.
Is there a technique you can use to overlap servo movements smoothly?
Many thanks
Bidge

Hello.

It sounds like you are using the sequencer. If that is the case, you can achieve something like this by setting your first frame to move the head, with a delay time that is only half of the time it takes for the “head” servo to move to that target. Then, the second frame would still have the same target for the “head” servo and do a blink for the “eyes” servos.

For example, if frame 0 sets the “head” servo to a target of 4000 and that movement takes 1 second to complete, you can set the duration of that frame to 500ms. Then, frame 1 would still have the “head” servo at a target of 4000, but move the “eyes” servo to a target of 6000. If you want the eyes to open again in 0.25 seconds, you can have the third frame move the “eyes” servo back to 4000 and still have the head servo at 4000.

Another way to do is to write your own Meastro script. Doing this would give you more control over all the details, but it has a slightly higher learning curve if you have never worked with a stacked-based language before. If you want to try it, you can use the “Copy Sequence to Script” button in the “Sequence” tab of the Maestro Control Center to help get you started; however, you might want to try out some of the “Example Scripts” in the Maestro user’s guide to familiarize yourself with the language first. The “Step Script” button in the “Script” tab is also a very useful tool to walk through the code slowly and understand what each command is doing.

Brandon

Hey Brandon.
Thanks for that. I’ll try the first way you suggest and see how it goes. Script is probably a bit beyond me atm however I have dabbled in code so I could figure it but thanks so much for the help once again.

Cheers
Bidge

1 Like