1 Attachment(s)
X-Y Movement of the arm using mouse !!!
Hello !!
May be this piece of code can help u in sending a stream of strings as u want !! (X-Y Movement) and continous streaming !!!
Send the values of X and Y text boxes to the COM port.
U have to modify this code as per ur requirements !!
here the values of textboxes ranges from 0-100 in both the directions
You have to set the value between 25 to 225 if using Servo motors !!
the arm movements will follow the mouse movements in x-y position.
(Note: here code only shows X-Y movements !!! and it doesnt contain
COM event programming !! You have to use COM control for
sending textbox values to the port)
I hope u'll find this code helpful and useful for your project !!
Regards
Mazhar Haque
PLS have a look at the attached ZIP file !!!
--------------------------------------------------------------------------
Private Sub Command1_Click()
xl.Visible = True
yl.Visible = True
Picture2.Visible = False
End Sub
Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 2 Then
xl.Visible = False
yl.Visible = False
Picture2.Visible = True
End If
End Sub
Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim intx As Integer
Dim inty As Integer
xl.Y1 = Y
xl.Y2 = Y
intx = Abs(Y - 100)
xt.Text = intx
yl.X1 = X
yl.X2 = X
inty = Abs(X - 100)
yt.Text = inty
End Sub