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

Micro Maestro 6-Channel (Newb) scripting simple 3 position servo project


#1

Hello, I started this project not even knowing code at all. I have gone through the sequences and copied the sequences to scripting. But I have no idea how to change the speeds between positions. The servo starts at position 1 waits for remote control push button activation to start the sequences. 2nd position is at 1/3 way at “7” “speed”. then it sits there for 7 seconds and then moves to position 3 at “12” “speed” all the way to end (end of - 90 degrees), and is supposed to immediately zip back as fast as possible back to position 1.
What I get is the zip speed between each position (100), and I have no earthly idea to modify the script to achieve this. I can see the script page, but I do not know how to edit it or then save it and download it to the Maestro. Little help? Thank you!

Below is the code thus far as much as I can reproduce:

0000: –
0000: –
0000: – ### Sequence subroutines: ###
0000: –
0000: – # Sequence 0
0000: – sub Sequence_0
0000: 030EF40100000000000000000000221981 – 500 0 0 0 0 0 6434 frame_0…5 # Frame 0
0011: 0304F401800F82 – 500 3968 frame_5 # Frame 1
0018: 0304F401401F82 – 500 8000 frame_5 # Frame 2
001F: 05 – return
0020: –
0020: – sub frame_0…5
0020: 02052A – 5 servo
0023: 02042A – 4 servo
0026: 02032A – 3 servo
0029: 02022A – 2 servo
002C: 02012A – 1 servo
002F: 02002A – 0 servo
0032: 08 – delay
0033: 05 – return
0034: –
0034: – sub frame_5
0034: 02052A – 5 servo
0037: 08 – delay
0038: 05 – return
0039: –

Subroutines:
Hex Decimal Address Name
00 000 0000 SEQUENCE_0
01 001 0020 FRAME_0…5
02 002 0034 FRAME_5


#2

Hello.

Once your sequence is copied over to the “Script” tab of the Maestro Control Center, you can change the speed of a specific servo channel by inserting the SPEED command. Information about this command can be found in the Command Reference section of the Maestro user’s guide.

By the way, it looks like you used the “Copy all Sequences to Script”, which places the sequences in subroutines. If you want this sequence to be your main loop, you probably want to use the “Copy Sequence to Script” button instead. This will create a BEGIN/REPEAT loop that should run correctly without additional coding.

If you try adding the SPEED commands to your code and run into problems, you can post what you have so far here and I would be glad to take a look. Also, when you share your script on the forum, it is typically more helpful to copy the code directly from the “Script” tab of the Maestro Control Center instead of the compiled code.

Brandon


#3

I have no way to copy directly from script because I have to use a PC laptop and a memory stick to Mac OS Word file…

I tried to figure it out, but it is all harder than reading greek to me. I have no idea what to do.


#4

Okay, I got it finally! THank you!, now, silly question- how do I upload the file into the Maestro so it is programmed complete?


#5

nevermind, I figured it out, thanks.