VB 2010 Get Position

Hi,

I move any servos with a analog-stick of a gamepad (push stick a little -->servo move lowspeed, push the stick hard --> servo move highspeed… you know what i meen :smiley: )

my problem is, if i drop the analog-stick the servo dont stop…

my idea is:
if drop the stick then
get position of the servo and set is to target
end if

I have no idea how to read bytes…

my try:

getposi(0) = 144
getposi(1) = 0
SerialPort1.Write(getposi, 0, 2)
TextBox1.Text = SerialPort1.ReadByte

Hello.

We’ve been through this before, but what servo controller are you using?

As documented in the “Serial Servo Commands” section of the Maestro user’s guide, the Get Position command returns two bytes but your code example only reads one byte. Please try this:

TextBox1.Text = SerialPort1.ReadByte() + (SerialPort1.ReadByte() << 8)

–David