The Maestro Control Center app works fine.
The Mini Maestro 12 shows up as COM4, with tty on COM3, according to Win7.
But a serial port sniffer shows no data going to COM4 when using Maestro Control Center, nor when pushing bytes directly to COM4, so I have no way of seeing if which comma delineated bytes, hex, or end of line options are needed.
I do see a blink of the green LED when I send a string to COM4, though the servos never move.
I if could just see the bytes the Maestro Control Center was pushing, then create my bytes to match, all would be well.
What am I doing wrong?
thanks
(EDIT: mini maestro is in USB dual port mode, 9600 8n1 for all connections)
Hello. The Maestro Control Center does not use the COM ports; it uses the native USB interface. For a description of what serial bytes the Maestro expects to receive, see the “Serial Interface” section of the Maestro User’s Guide.
There is no concept of a “line” in the Maestro’s serial protocol. All the commands consist of arbitrary binary bytes between 0 and 255; ASCII is not involved at all. Please make sure you are sending actual binary bytes instead of ASCII representations of hex numbers or something like that. The commas shown in the user’s guide are there to make it readable; they are not actually sent to the Maestro.
Thanks for the response. I’m still puzzled, however:
pololu.com/docs/0J40/5.a describes discovering the COM ports, and the block diagram shows the “Command Port” being used to transmit data to the Mini Maestro. If this is not referring to virtual serial port COM4 (in my case), to what does it refer?
How does one push a command from an external (non-Pololu Command Center) program to the Mini Maestro 12?
Clarity in the manual is foggy, as both decimal and hex values are shown, leading one to think either is a valid choice.
Similarly, including commas in a code example where commas are not allowed breaks the example.
I’ll check out the Pololu Serial Transmitter. Thanks again.
If you look at the ports in the Device Manager, it should be pretty clear which COM port is which. If you see something similar to “Mini Maestro 12-Channel Servo Controller Command Port (COM4)” then COM4 is indeed the Command Port.
To control the Maestro from your own software, set the serial mode to USB Dual Port using the Maestro Control Center and then send bytes to the Command Port. Alternatively, you can use the native USB interface (just like the Maestro Control Center), and we have lots of example code for doing that in the Pololu USB SDK. There is a section in the user’s guide entitled “Writing PC Software to Control the Maestro”.
Have you ever dealt with actual bytes before instead of text? If not, there can be a bit of a learning curve because you have to grok the idea that a byte is simply an integer between 0 and 255. A byte has 8 bits. There is no such thing as a “comma” if you are just talking about bytes. Commas and all the other printable characters are defined in standards like ASCII and the Maestro does not use these standards. It doesn’t matter if you write the byte as 0x0A or 10 in your source code because both of them mean the same thing. You can’t send a comma to the Maestro because the Maestro’s serial protocol does not support any type of character encoding. This kind of data is often called “binary”, as opposed to ASCII. The Set Target command, when using the Compact Protocol, just consists of four bytes. These four bytes are documented in the “Serial Servo Commands” section of the user’s guide. We put commas and spaces there because lists of things generally have commas and spaces and it would be hard to read otherwise.
Things might get clearer if you looked at the “Serial Example Code” section of the Maestro User’s Guide.
Here is a table that shows you the correspondence between bytes (0-127) and ASCII characters:
You can see that in ASCII, a comma is encoded as byte 44, also known as 0x2C. You might end up sending 0x2C to the Maestro at some point, but the Maestro doesn’t use ASCII so the 0x2C doesn’t represent a comma.