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

Pololu Forum

MICRO MAESTRO 6 Servo speed

Hello to all,

first of all let me introduce myself; my name is Sergio and i live in Belgium, i am starting with the Maestro micro controllers and they work just fine; but when programing i feel the need for changing the speed off servo 1.
I need servo 1 to go to a position very fast; and then go to another position very slow. i try to change the speed but when i put the Maestro doing it , the spped is always the same.

my question is:

is it possible to do what i want?

Thanks in advance;

Best regards from Belgium,

Sergio

Hello, Sergio.

Welcome to the forum! I moved your thread to the “Servo controllers and servos” section of the forum since it is specific to the Maestro.

You should be able to change the speed of the servo between movements on the Maestro like you are describing. Can you post more information about how you are using the Maestro (i.e. USB, serial, Maestro script)? How are you changing the speed for that channel and what are you setting it to? Could you also post your Maestro settings file? You can save your settings file from the “File” drop-down menu of the Maestro Control Center while the controller is connected.

Brandon

Hi Brandon,

thank you so much for your answer. i will try to post all info you need:

i am using USB to control the Maestro;
i am changing the speed in the STATUS tab.

test1.txt (4.4 KB)

i want the last frame to be very slowly…

i would like to learn how to do it…

Best regards,

Sergio

Thank you for the additional information. If you want the speed and acceleration remain unchanged for all of your frames except the last one (frame 21), you will need to add some code to your generated script to do this. If you’re new to Maestro scripts, I suggest reading through the “Maestro Scripting Language” section of the Maestro user’s guide.

Currently, frame 21 starts on line 24 of your script, so you can add some speed and acceleration commands before that to change the settings of the servo channels used by that frame (which are channels 0-3). Both of those commands work similarly: by using a value and channel number followed by the command. Here is an example of setting the speed of channel 0 to a value of 5 and the acceleration of channel 0 to 10:

5 0 speed #set the speed of channel 0 to 5
10 0 acceleration #set the acceleration of channel 0 to 10

You would need to do this for each of the 4 servo channels used by frame 21 if you want them to all move at the slower speeds. Keep in mind that a value of 1 is the slowest the Maestro can limit a servo’s speed or acceleration to.

However, after these new lines of code run all subsequent movements on those channels will be affected, so once your script loops back to the first frame, those channels will still be moving at a slower speed. To fix this, you can have another set of speed and acceleration commands that put the settings of those channels back to a value of 50 (which is what you have them set to right now) after frame 21:

50 0 speed #set the speed of channel 0 to 5
50 0 acceleration #set the acceleration of channel 0 to 10

Also, you will need to start your sequence by running the script (i.e. clicking the “Run Script” button in the Script tab of the Maestro Control Center) for this to work. Playing the sequence from the Sequence tab will not use the code from the script that has your modifications.

If you try modifying your code to do this and run into problems, you can post your updated script and I would be happy to take a look.

Brandon

Dear Brandon,

first of all sorry for the time it toke to thank you… so THANK YOU FOR YOUR TIME!!!

I will try to do as you say if i get in to trouble i will let you know…

Meanwhile i will make you another question… sorry…

I am trying also in a MAESTRO 12 SERVO to make a button (input) so i can make all my sequence to play… after stop if i push the button the sequence will start again… my idea if possible is to have a script with all this and then in can add my sequence… is this possible? i need my input to be in the 11 and i need a output for a sound card in the 10 and 9.

Once again thank you and best regards from Belgium,

Sergio

You can copy your sequence to a script and add some code to wait for a button press before running the sequence. You can find a small example of what that additional code could look like in my post here. However, it is not clear to me what you are doing with your sound card or how that relates to starting your sequence with a button press.

Brandon