Masetro Servo Conroller LED On/Off

How can i turn On/Off the on board LED through the USB link using C code.
the same way as it is avaliable by scrip.

Hello, shlomon.

You could write a little script like this:

sub on
  led_on
  quit

sub off
  led_off
  quit

Then put the Maestro in USB Dual Port, and send the appropriate “Restart Script at Subroutine” serial commands to the Maestro on its Command Port. Let me know if you have further questions about how to do this.

–David

Hello David,

Thanks for your replay.

How do i call a sub in script through c program?
How do i load the script into the device without using the control program?
is there an option to use only C program without a script?

Thanks

You would need to put the Maestro in USB Dual Port, and send the appropriate “Restart Script at Subroutine” serial command to the Maestro on its Command Port. Let me know if you have further questions about how to do this. If you tell me what OS you are using, I might be able to show you some sample code for sending bytes to a serial port in C.

You can save a Maestro configuration file using the Maestro Control Center, then load it onto the device using UscCmd, the command-line utility that comes with the control center.

No, there isn’t. Since you have to change the Maestro’s configuration to accept commands from USB anyway, there’s no big drawback to also loading a script onto it at the same time. Loading the script is just as easy as changing the serial mode.

–David