I can not get my servo to move in VB. I think I may be oversimplifying it.
when I hit button9 I would like to drive the servo to a specific point.
Private Sub Button9_Click(sender As Object, e As EventArgs) Handles Button9.Click Dim SerialBytes(4) As Byte Dim Channel As Integer Channel = 0 SerialBytes(0) = 170 ' Command Byte: Set Target. SerialBytes(1) = Channel ' First data Byte holds channel number. SerialBytes(2) = 112 ' Second Byte holds the lower 7 bits Of target. SerialBytes(3) = 46 ' Third data Byte holds the bits 7-13 Of target.data(0) = 132 SerialPort4.PortName = "COM4" SerialPort4.Open() SerialPort4.Write(SerialBytes, 0, 4) SerialPort4.Close() End Sub
please let me know what I am doing wrong. The yellow light on the board blinks when I press the button, but nothing else happens.