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

Pololu Forum

Maestro with a start button

Hello to all,

i am a newbie with the Maestro servo controllers but i love it… i already made lots of progress but i am stuck with the button that i need to start my script.

Can someone be so nice to add this feature to my 2 scripts? i really need this help…

Maestro 12

i need the button in the 11 position to start my script… and restart the script each time i push the button…

script: FILOSOPHES 2

0000:                      -- # FILOSOPHES 2
0000:                      -- begin
0000: 0318E8032C1F88108B21D623401F401F800FC018C01800000000 --   1000 7980 4232 8587 9174 8000 8000 
001A: 80                   --   3968 6336 6336 0 0 frame_0..10 # Frame 0
001B: 0310E8032219841F800F800F2517BB1EC00A --   1000 6434 8068 3968 3968 5925 7867 
002D: 81                   --   2752 frame_0..3_5_7_8 # Frame 1
002E: 030EDC05401FEC0F800F401FC00A231F82 --   1500 8000 4076 3968 8000 2752 7971 frame_0_1_4_5_7_8 # Frame 2
003F: 030CDC05E81EDA147019AF16941B83 --   1500 7912 5338 6512 5807 7060 frame_1..5 # Frame 3
004E: 0308DC056E1AB821001F84 --   1500 6766 8632 7936 frame_0_7_8 # Frame 4
0059: 0308DC057C11E10FC00A85 --   1500 4476 4065 2752 frame_4_5_7 # Frame 5
0064: 03049600AE1786       --   150 6062 frame_6 # Frame 6
006B: 0314D007401F9620AF23B72A051F401F800FA9172311 --   2000 8000 8342 9135 10935 7941 8000 
0081: 87                   --   3968 6057 4387 frame_0..8 # Frame 7
0082: 0304E803E71886       --   1000 6375 frame_6 # Frame 8
0089: 03149001841D7311800F800F800F9C16920F7F20251C --   400 7556 4467 3968 3968 3968 5788 
009F: 87                   --   3986 8319 7205 frame_0..8 # Frame 9
00A0: 03129001E119A5234B24F12BF31D051FC00A6D0B --   400 6625 9125 9291 11249 7667 7941 
00B4: 88                   --   2752 2925 frame_0..5_7_8 # Frame 10
00B5: 0312E8031D1FC111800F4F156712A91AD31C2F1E --   1000 7965 4545 3968 5455 4711 6825 
00C9: 88                   --   7379 7727 frame_0..5_7_8 # Frame 11
00CA: 0304E803021986       --   1000 6402 frame_6 # Frame 12
00D1: 0314DC0570194224C124B72A911D401F920FF60E4611 --   1500 6512 9282 9409 10935 7569 8000 
00E7: 87                   --   3986 3830 4422 frame_0..8 # Frame 13
00E8: 0312DC05C018C018C018C018C018C018C018C018 --   1500 6336 6336 6336 6336 6336 6336 
00FC: 88                   --   6336 6336 frame_0..5_7_8 # Frame 14
00FD: 060000               -- repeat
0100:                      -- 
0100:                      -- sub frame_0..10
0100: 020A2A               --   10 servo
0103: 02092A               --   9 servo
0106: 02082A               --   8 servo
0109: 02072A               --   7 servo
010C: 02062A               --   6 servo
010F: 02052A               --   5 servo
0112: 02042A               --   4 servo
0115: 02032A               --   3 servo
0118: 02022A               --   2 servo
011B: 02012A               --   1 servo
011E: 02002A               --   0 servo
0121: 08                   --   delay
0122: 05                   --   return
0123:                      -- 
0123:                      -- sub frame_0..3_5_7_8
0123: 02082A               --   8 servo
0126: 02072A               --   7 servo
0129: 02052A               --   5 servo
012C: 02032A               --   3 servo
012F: 02022A               --   2 servo
0132: 02012A               --   1 servo
0135: 02002A               --   0 servo
0138: 08                   --   delay
0139: 05                   --   return
013A:                      -- 
013A:                      -- sub frame_0_1_4_5_7_8
013A: 02082A               --   8 servo
013D: 02072A               --   7 servo
0140: 02052A               --   5 servo
0143: 02042A               --   4 servo
0146: 02012A               --   1 servo
0149: 02002A               --   0 servo
014C: 08                   --   delay
014D: 05                   --   return
014E:                      -- 
014E:                      -- sub frame_1..5
014E: 02052A               --   5 servo
0151: 02042A               --   4 servo
0154: 02032A               --   3 servo
0157: 02022A               --   2 servo
015A: 02012A               --   1 servo
015D: 08                   --   delay
015E: 05                   --   return
015F:                      -- 
015F:                      -- sub frame_0_7_8
015F: 02082A               --   8 servo
0162: 02072A               --   7 servo
0165: 02002A               --   0 servo
0168: 08                   --   delay
0169: 05                   --   return
016A:                      -- 
016A:                      -- sub frame_4_5_7
016A: 02072A               --   7 servo
016D: 02052A               --   5 servo
0170: 02042A               --   4 servo
0173: 08                   --   delay
0174: 05                   --   return
0175:                      -- 
0175:                      -- sub frame_6
0175: 02062A               --   6 servo
0178: 08                   --   delay
0179: 05                   --   return
017A:                      -- 
017A:                      -- sub frame_0..8
017A: 02082A               --   8 servo
017D: 02072A               --   7 servo
0180: 02062A               --   6 servo
0183: 02052A               --   5 servo
0186: 02042A               --   4 servo
0189: 02032A               --   3 servo
018C: 02022A               --   2 servo
018F: 02012A               --   1 servo
0192: 02002A               --   0 servo
0195: 08                   --   delay
0196: 05                   --   return
0197:                      -- 
0197:                      -- sub frame_0..5_7_8
0197: 02082A               --   8 servo
019A: 02072A               --   7 servo
019D: 02052A               --   5 servo
01A0: 02042A               --   4 servo
01A3: 02032A               --   3 servo
01A6: 02022A               --   2 servo
01A9: 02012A               --   1 servo
01AC: 02002A               --   0 servo
01AF: 08                   --   delay
01B0: 05                   --   return
01B1:                      -- 
01B1:                      -- 

Subroutines:
Hex Decimal Address Name
00  000     0100    FRAME_0..10
01  001     0123    FRAME_0..3_5_7_8
02  002     013A    FRAME_0_1_4_5_7_8
03  003     014E    FRAME_1..5
04  004     015F    FRAME_0_7_8
05  005     016A    FRAME_4_5_7
06  006     0175    FRAME_6
07  007     017A    FRAME_0..8
08  008     0197    FRAME_0..5_7_8

MAESTRO 12

SCRIPT: FILOSOPHES 1

0000:                      -- # FILOSHOPES 1
0000:                      -- begin
0000: 031AF401C018C018C018C018C018C018C0180000000000000000920F --   500 6336 6336 6336 6336 6336 6336 
001C: 80                   --   6336 0 0 0 0 3986 frame_0..11 # Frame 0
001D: 0308D007800F6323C42281 --   2000 3968 9059 8900 frame_0_1_6 # Frame 1
0028: 0308D007800F3625941B82 --   2000 3968 9526 7060 frame_4..6 # Frame 2
0033: 030CD0075511800F60230B186F2683 --   2000 4437 3968 9056 6155 9839 frame_0_3..6 # Frame 3
0042: 030CD0079F0E800F401FB61F800F84 --   2000 3743 3968 8000 8118 3968 frame_1..3_5_6 # Frame 4
0051: 030ED0074C17EC1E29144C178023D92185 --   2000 5964 7916 5161 5964 9088 8665 frame_0..3_5_6 # Frame 5
0062: 0304F401601786       --   500 5984 frame_2 # Frame 6
0069: 0304F4012E1186       --   500 4398 frame_2 # Frame 7
0070: 030ED007480D9D15311CB612731E581C87 --   2000 3400 5533 7217 4790 7795 7256 frame_1..6 # Frame 8
0081: 030AD0071F1B6323E11C631588 --   2000 6943 9059 7393 5475 frame_0..3 # Frame 9
008E: 0310D007C018C018C018C018C018C018C018 --   2000 6336 6336 6336 6336 6336 6336 
00A0: 89                   --   6336 frame_0..6 # Frame 10
00A1: 060000               -- repeat
00A4:                      -- 
00A4:                      -- sub frame_0..11
00A4: 020B2A               --   11 servo
00A7: 020A2A               --   10 servo
00AA: 02092A               --   9 servo
00AD: 02082A               --   8 servo
00B0: 02072A               --   7 servo
00B3: 02062A               --   6 servo
00B6: 02052A               --   5 servo
00B9: 02042A               --   4 servo
00BC: 02032A               --   3 servo
00BF: 02022A               --   2 servo
00C2: 02012A               --   1 servo
00C5: 02002A               --   0 servo
00C8: 08                   --   delay
00C9: 05                   --   return
00CA:                      -- 
00CA:                      -- sub frame_0_1_6
00CA: 02062A               --   6 servo
00CD: 02012A               --   1 servo
00D0: 02002A               --   0 servo
00D3: 08                   --   delay
00D4: 05                   --   return
00D5:                      -- 
00D5:                      -- sub frame_4..6
00D5: 02062A               --   6 servo
00D8: 02052A               --   5 servo
00DB: 02042A               --   4 servo
00DE: 08                   --   delay
00DF: 05                   --   return
00E0:                      -- 
00E0:                      -- sub frame_0_3..6
00E0: 02062A               --   6 servo
00E3: 02052A               --   5 servo
00E6: 02042A               --   4 servo
00E9: 02032A               --   3 servo
00EC: 02002A               --   0 servo
00EF: 08                   --   delay
00F0: 05                   --   return
00F1:                      -- 
00F1:                      -- sub frame_1..3_5_6
00F1: 02062A               --   6 servo
00F4: 02052A               --   5 servo
00F7: 02032A               --   3 servo
00FA: 02022A               --   2 servo
00FD: 02012A               --   1 servo
0100: 08                   --   delay
0101: 05                   --   return
0102:                      -- 
0102:                      -- sub frame_0..3_5_6
0102: 02062A               --   6 servo
0105: 02052A               --   5 servo
0108: 02032A               --   3 servo
010B: 02022A               --   2 servo
010E: 02012A               --   1 servo
0111: 02002A               --   0 servo
0114: 08                   --   delay
0115: 05                   --   return
0116:                      -- 
0116:                      -- sub frame_2
0116: 02022A               --   2 servo
0119: 08                   --   delay
011A: 05                   --   return
011B:                      -- 
011B:                      -- sub frame_1..6
011B: 02062A               --   6 servo
011E: 02052A               --   5 servo
0121: 02042A               --   4 servo
0124: 02032A               --   3 servo
0127: 02022A               --   2 servo
012A: 02012A               --   1 servo
012D: 08                   --   delay
012E: 05                   --   return
012F:                      -- 
012F:                      -- sub frame_0..3
012F: 02032A               --   3 servo
0132: 02022A               --   2 servo
0135: 02012A               --   1 servo
0138: 02002A               --   0 servo
013B: 08                   --   delay
013C: 05                   --   return
013D:                      -- 
013D:                      -- sub frame_0..6
013D: 02062A               --   6 servo
0140: 02052A               --   5 servo
0143: 02042A               --   4 servo
0146: 02032A               --   3 servo
0149: 02022A               --   2 servo
014C: 02012A               --   1 servo
014F: 02002A               --   0 servo
0152: 08                   --   delay
0153: 05                   --   return
0154:                      -- 
0154:                      -- 

Subroutines:
Hex Decimal Address Name
00  000     00A4    FRAME_0..11
01  001     00CA    FRAME_0_1_6
02  002     00D5    FRAME_4..6
03  003     00E0    FRAME_0_3..6
04  004     00F1    FRAME_1..3_5_6
05  005     0102    FRAME_0..3_5_6
06  006     0116    FRAME_2
07  007     011B    FRAME_1..6
08  008     012F    FRAME_0..3
09  009     013D    FRAME_0..6

if someone touch the button when the scrip is running the button should be inactive…

Thank you so much and best regards to all…

Sergio

Hello, Sergio.

I moved your post to the “Servo controllers and servos” section of the forum since it seems more appropriate.

It looks like you posted the compiled code instead of your raw script; it would not be practical to make changes to the complied code and upload it back to your Maestro. However, you can follow the suggestion I made in this post to make your script wait for a button press before starting. The button will be ignored if it is pressed again while the script is running.

If you try doing that and run into problems, can you post copies of your settings files that contain your updated scripts (instead of the compiled code)? You can save the settings file from each respective Maestro from the “File” drop-down menu of the Maestro Control Center while it is connected.

Brandon

Hi Brandon;

thank you for your quick answer, i follow some ideas from the post you recommend me but still not working…

Please can you be so kind to see what am i doing wrong?

here is my script:

FILOSHOPES 2_2.txt (7.1 KB)

Best regards ,

Sergio

Hi Brandon,

i try another sequence with another Maestro and it works fine…
but when i take out the usb and use the little blue bridge to use (5v for powering and processing° nothing works…

Can you tell me what am i doing wrong…

Thanks in advance

Sergio
PHILOSPHES 1.txt (5.2 KB)

Hello.

It looks like you have the button logic reversed in the two settings files you posted (i.e. the first one is waiting for the input channel to go high before continuing while the second one is waiting for it to go low). If you are still having problems getting the first setup to work, and would like to troubleshoot it, can you post pictures of that setup that show all of your connections, as well as more details about what it is doing? For example, what do you mean when you say it is “still not working”?

For the second setup, can you post more information about how you are powering it when it is not connected to USB? From your wording, it sounds like you might be trying to power VIN from 5V; however, please note that 5V is the Maestro’s minimum operating voltage, so if your supply is 5V it might not be enough to handle the Maestro as well as your servos. Pictures of this setup would also be helpful.

Brandon

Hello Brandon and thank you for your help,

please see the photos of the second setup:

yes i am using a transfo 5V 1A to power VIN; i am waiting for a new transfo to test it.

for the 1 setup, things are very complicated;

i control servos, a relais for a piezzo, and sound:

please see photos:

Best regards,

Sergio

Thank you for the pictures. Wow, there is a lot going on in your system! With that number of servos and additional peripherals, I suspect your 1A power supply is not enough, and the voltage is dropping too low for the Maestro when you are not powering it from USB. You might try measuring the VIN voltage while the system is running to see what it is doing.

It looks like you are using mostly FS90 servos from Feetech. The stall current for those servos at 5V is around 700mA and the no-load operating current is around 100mA. If you are running 6 of them, that means when under no-load, your supply will need to handle a constant draw of around 600mA, and when they are all moving or loaded, it could see current draws upwards of 4.2A. Since this is only taking into account the servos, I suspect a more appropriate power supply for your system would be one that can handle 5A or more (depending on the power demands of the other devices in your system).

Brandon