Command line for VB 2005

Could someone post a sample command line for VB 2005? I have tried numerous methods that I came up with from the VB6 code on the gpsbots page, but get nothing but a flashing red light.


As Jan posted in another thread:

If you’re using VB 2005, locate the SerialPort component (System.IO.Ports.SerialPort) in the Toolbox window (you can display the Toolbox using the View menu if it isn’t showing) and add it to your project. Its name should default to SerialPort1, which is what I will be referring to it as. Configure its properties for your controller’s specific COM port and desired baud rate (e.g. BaudRate: 9600, DataBits: 8, Parity: None, StopBits: One, PortName: COM2). If you want to use the simpler SSC protocol, make sure you have the blue shorting block over the two jumper pins and you’re using a baud rate of either 2400 or 9600.

With your servo controller connected to your computer, the following code should allow you to connect to it and send it commands:

Dim buffer As Byte() = {0, 0, 0}
buffer(0) = 255
buffer(1) = <servo number>
buffer(2) = <servo position>
SerialPort1.Write(buffer, 0, 3)

- Ben

I knew about the serial port control, but I was using the writeline command because I saw it in another program from controlling the servo controller. The write command worked perfectly. I am using the pololu mode because I am using it for a robotic arm and need the advanced control. You have helped alleviate a lot of frustration I had in figuring it out.