Pololu Robotics & Electronics
Menu
My account Comments or questions? About Pololu Contact Ordering information Distributors

New User just need a few pointers


#1

I have a Micro serial Sevro controller and I trying to control it via rs232 from a pc program VB6 or PowerBasic or for now Polilu’s serial transmitter program. I do have the PC’s rs232 TX connected to the Micro serial Sevro controller’s rs232 input and gnd to gnd. Using Pololu mode (jumper open)
Is there a VB6 example any place?
The user guide explains the basics but does not show the order the commands need to be run.
I assume I have to start at command 0
Start byte = 0x80, ID = 0x01 (servo 0 ), command = 0x00 (Set param’s) servo Num = 0x00 data 0x0f : servo on, forward, range 15

Next I guess I have to do command 0x01
Start byte = 0x80, ID = 0x01 (servo 0 ), command = 0x01 (Set speed) servo Num = 0x00 data 0x40

Next is the position so I need to choose a position command 2,3,4 or 5 depending on what I want to do

Does this sound correct?

Thanks


#2

Hello.

Just to clarify, according to the Micro Serial Servo Controller User’s Guide, byte 2 in Pololu protocol is the Pololu device type number (or device ID), which is always 0x01, not the servo number as described in your parenthetical.

With your first command sequence [0x80,0x01,0x00,0x00,0x0F], you are setting channel 0 to be off, not on. If you want servo channel 0 to be on (along with setting the direction to be forward and the range to be 15), the data byte would be 0x4F. I recommend looking at the illustration next to the “Command 0: Set Parameters (1 data byte)” heading in the user’s guide to get a better understanding of which bits to set in the data byte.

Also, it sounds like you are under the impression that the command numbers (Command 0-5) of the Pololu protocol denote the order in which they need to be sent to the micro serial servo controller. They do not; you can send those commands whenever necessary for your application.

By the way, if you do not have a specific reason for using the micro serial servo controller, I recommend using one of our Maestro servo controllers which are better in almost every way (including documentation). Unfortunately, we do not have any VB6 examples for the micro serial servo controller, but one of our other forum members shared their VB6 example for our Maestro servo controllers. You can view the code here. (Please note that the protocols of the two servo controllers are different, so you cannot use the Maestro example directly with the micro serial servo controller.)

- Amanda