Hi, my name is Adolfo from Mexico and I have been using the micro maestro in a work project.
Everything it’s ok.
I have no mistakes at using a microcontroller to send serial commands to the maestro.
Except when I try to use a certain command:
"Restart Script at Subroutine".
When I send the compact protocol 0xAA,0x00 (I want start at the first subroutine of the script) The script doesn’t work and give me the error code 0x0040 of Stack overflow/underflow.
I read in the guide that “Subroutines used this way should not end with the
RETURN command, since there is no place to return to — instead, they should contain infinite loops or end with a QUIT command.”
I Only want to know what I need to do to start the maestro at the first subroutine using the serial command; I can use the RST pin to start and stop the maestro but I don’t like this way.
Here I leave the scrip that the control center generate when I push the “Copy Sequence to Script” button.
# Sequence 0
begin
500 6218 0 7236 5122 0 6825 frame_0..5 # Frame 0
500 4046 5690 6923 7530 frame_0_2_3_5 # Frame 1
500 6864 6688 6081 7902 frame_0_2_3_5 # Frame 2
500 5005 5181 4516 4692 frame_0_2_3_5 # Frame 3
500 6708 7275 5494 5220 frame_0_2_3_5 # Frame 4
500 4770 frame_0 # Frame 5
repeat
sub frame_0..5
5 servo
4 servo
3 servo
2 servo
1 servo
0 servo
delay
return
sub frame_0_2_3_5
5 servo
3 servo
2 servo
0 servo
delay
return
sub frame_0
0 servo
delay
return
And Here I leave the result that give me the button “View compiled code”.
0000: -- # Sequence 0
0000: -- begin
0000: 030EF4014A180000441C02140000A91A80 -- 500 6218 0 7236 5122 0 6825 frame_0..5 # Frame 0
0011: 030AF401CE0F3A160B1B6A1D81 -- 500 4046 5690 6923 7530 frame_0_2_3_5 # Frame 1
001E: 030AF401D01A201AC117DE1E81 -- 500 6864 6688 6081 7902 frame_0_2_3_5 # Frame 2
002B: 030AF4018D133D14A411541281 -- 500 5005 5181 4516 4692 frame_0_2_3_5 # Frame 3
0038: 030AF401341A6B1C7615641481 -- 500 6708 7275 5494 5220 frame_0_2_3_5 # Frame 4
0045: 0304F401A21282 -- 500 4770 frame_0 # Frame 5
004C: 060000 -- repeat
004F: --
004F: --
004F: -- sub frame_0..5
004F: 02052A -- 5 servo
0052: 02042A -- 4 servo
0055: 02032A -- 3 servo
0058: 02022A -- 2 servo
005B: 02012A -- 1 servo
005E: 02002A -- 0 servo
0061: 08 -- delay
0062: 05 -- return
0063: --
0063: --
0063: --
0063: --
0063: -- sub frame_0_2_3_5
0063: 02052A -- 5 servo
0066: 02032A -- 3 servo
0069: 02022A -- 2 servo
006C: 02002A -- 0 servo
006F: 08 -- delay
0070: 05 -- return
0071: --
0071: --
0071: --
0071: -- sub frame_0
0071: 02002A -- 0 servo
0074: 08 -- delay
0075: 05 -- return
0076: --
0076: --
Subroutines:
Hex Decimal Address Name
00 000 004F FRAME_0..5
01 001 0063 FRAME_0_2_3_5
02 002 0071 FRAME_0
Could somebody help me?