All Tutorials / Steve G / Setting Servo speeds and Initialization Script Tutorial

Setting Servo speeds and Initialization Script Tutorial

Step 2. Servo Speed Init, Part 2.

You may have several "Init" commands for different scripts and/or controls in you project that all need to start when you connect your EZ-B to EZ-Builder. Some of these "Init" scripts you may wish to call again while your project is already running, for example, the Off button I mentioned in the last step. So instead of having one large script in the "Connection Control" containing all of your "Init" scripts, add a "Script Manager" control to your project, and place each of your "Init" commands in individual script controls. So, using our servo speed example...

1.) On the EZ Builder menu ribbon, click on "Project", then "Add Controls", then click "Scripting", and then "Script Manager" to add the control to your project.

User-inserted image

2.) This step is optional, but it is recommended. On the bottom of the "Script Manager" control, click on the gear icon and rename the control to something of your choosing, something like "Init Manager", then hit "Save".

User-inserted image

3.) Again, on the bottom of the Script Manager control, click "Add Script". The script editor will automatically open.

User-inserted image

4.) In the script editor, write in your servo speed "Init" script.

User-inserted image

5.) This is quite an important part, and this is to name your script. On the top left of the script editor, click on the text input field (it may already say something like "Script 1") and rename your new script to something like "Servo Speed Init", and then press "Save" to close the script editor.

User-inserted image

A final couple of steps are needed now to add the command in the "Connection control" to automatically start your servo speed "Init" script.

6.) Click on the gear icon next to your EZ-B's IP address on the "Connection Control" to open the script editor.

User-inserted image

7.) In the script editor, right click your mouse/trackpad button to bring up the list of Cheat Sheet commands, find the name of your script manager (in our example, "Init Manager") and click to expand the command list. Click on "ControlCommand,Init Manager,Start", then Click "Save" to close the editor, and "Save" again to close the "Connection Control" menu.

User-inserted image

8.) Now all that remains, is to save these changes to your EZ Builder project by hitting "File" and then "Save" in the menu ribbon.

User-inserted image