Command to switch Pololu servo

Hello,

I programm on a maestro servo controller (24 mini maestro) in C/C++ language. All works fine but i need to develop a function for switching serial mode (default UART to USB mode) without the “pololu maestro control center”. The problem is that i haven t seen the command (pololu protocol) to do that (User guide, Polulu Forum, Google).

Is it a possible function ?

Edit: Is there any command (still pololu protocol) for set max and min value on a servo ?

Thx for ur future advice
(and sry for my english speaking )

– Orphee

Hello,

Our design does not allow any permanent configuration over the serial connection. Part of the idea is that you can be sure that your microcontroller will not mess up the configuration that you have carefully prepared; and we also did not think there would be many applications for doing what you are talking about. Why do you need to switch the serial mode or change min/max on the fly?

If you want to access configuration from your own code, you can follow the examples in the USB SDK. Or you could use the UscCmd command line interface distributed with the Maestro Control Center - this would, for example, make it easy to automatically load your standard configuration file onto a bunch of Maestros.

-Paul

Thx for ur first answer,

I need to change the default mode (UART) to USB_chained serial mode for the init.
That’s why i need to change the serial mode, and min-max range of servos. I use it for a robot and i need to not use your control maestro center. I must do it in C/C++.

But i m interested to load automatically (in C/C++) a configuration i’ve prepared. But i’ve no idea how i can Set my configuration into the maestro… any suggestion ?

EDIT: In protocol.h, i found REQUEST_SET_PARAMETER = 0x82, what is the pololu protocal to set parameter ? i thought that could be a way for set min-max value.

Thx for ur help

– Orphee

Hello,

The comment above the REQUEST_* values says

// These are the values to put in to bRequest when making a setup packet
// for a control transfer to the Maestro.  See the comments and code in Usc.cs
// for more information about what these requests do and the format of the
// setup packet.

That means that these are for use with native USB commands, not with serial commands.

I think that for your application you should consider using UscCmd to load a saved configuration file. You just have to do "UscCmd --configure " to load the file. Does that not work for your application for some reason?

-Paul

Hello,

Well, I’ll try with uscCmd to loas a saved configuration file but i use C/C++ language. So, i ll try to adapt this uscCmd for C/C++ and load a file.
I ll post here the result after some try.

Thx for ur fast answers Paul.

– Orphee

Hello,

You should be able to just run UscCmd from your C/C++ program. Why do you want to rewrite it?

-Paul

Hello,

i tried ur solution u gave me before (UscCmd) and that works fine ! I can easily load a configuration file.

Thx a lot Paul ! I don’t know why i don t think about this solution before !

Thx again !

–Orphee

Great! I bet that saved you a ton of work!

-Paul