Visual Basic and USB 16-Servo Controller

First post! Loving Pololu so far! Using Visual Basic 6.0 and the MSComm control, I can’t make the USB 16-Servo Controller move a servo. I see the USB LED flicker when I send text strings, but special text characters like Chr(0), Chr(10) and Chr(13) may be getting lost in the MSComm control. Though it is supposedly allowed via the MSComm control, I don’t know how to send binary data down so values like 0, 10 and 13 go through. Any helpful hints?

And if the data is going down, what could I be doing wrong? 128, 1, 0, 12, 79 is a valid Command0 string for servo 12, right? 128, 1, 3, 12, 0, 127 moves servo 12 close to neutral, right? Somebody please jumpstart my brain, okay?

Thanks, Loren


I don’t have too much experience with VB, though I have used Microsoft Visual Basic 2005 to send serial data. I don’t know if the way I did it was optimal, but here’s the code I would use to send your Command 0 string:

Dim buffer As Byte() = {128, 1, 0, 12, 79}
SerialPort1.Write(buffer, 0, 5)

Your Command 0 is a valid command string, and your Command 3 would indeed move servo 12 close to neutral. Welcome to our forums!

- Ben

The problem was my bad eyes and a bit of imperfect documentation. Page 6, second paragraph (indented), says Pololu mode is the default, but the jumper was actually in place out of the package so Nini SSC II Mode was the default. I didn’t think to check and it was hard for me to see! Suggestion: Hang the jumper off one pin and ship the controller in Pololu mode. By the way, I had to solder on the servo power Phoenix connector myself; it had been inserted but never soldered.

Serial communications is a breeze in VB; I went back to my first attempt when I got into the right mode. Just send it strings; it doesn’t need binary data at all.



Way back in October Jan said: “The terminal block is optional since you can power the servos from one of the 16 servo connections. Most RC receiver packs have connectors that are the same shape as the servo connectors, so they plug right in. Others might want to solder in wires instead of the terminal blocks, so we include the terminal block as an option for the user.” That explains why mine wasn’t soldered in. Sorry! Good job, folks. Loving this stuff.


I’m very glad you have everything working. Thanks for the suggestion about the shorting block; it’s nice to get feedback from customers about things they find confusing or would like to see improved.

- Ben