Robot
Published on January 27 2013

6 Servo Arm Using Vb.net, Visual Studio 2010 Code And Video

StorySkip to comments

Hi,

I am writing a lot of code for EZ and I would like to share some of VB code.

Here is the code for the video below.




I am still working out timing and speed of servos.

Code:


If EzB_Connect1.EZB.servo.GetservoPosition(servo.servoPortEnum.D0) 1 Then
EzB_Connect1.EZB.servo.SetservoPosition(EZ_B.servo.servoPortEnum.D1, 0) 'wrist
Thread.Sleep(500)
EzB_Connect1.EZB.servo.Releaseservo(servo.servoPortEnum.D1)
End If

If EzB_Connect1.EZB.servo.GetservoPosition(servo.servoPortEnum.D2) 48 Then
EzB_Connect1.EZB.servo.SetservoPosition(EZ_B.servo.servoPortEnum.D2, 48) 'shoulder
Thread.Sleep(1000)
EzB_Connect1.EZB.servo.Releaseservo(servo.servoPortEnum.D2)
End If

If EzB_Connect1.EZB.servo.GetservoPosition(servo.servoPortEnum.D3) 46 Then
EzB_Connect1.EZB.servo.SetservoPosition(EZ_B.servo.servoPortEnum.D3, 46) 's piviot
Thread.Sleep(1000)
EzB_Connect1.EZB.servo.Releaseservo(servo.servoPortEnum.D3)
End If


EzB_Connect1.EZB.servo.SetservoPosition(EZ_B.servo.servoPortEnum.D5, 12) 'Vertical servo
Thread.Sleep(2000)
EzB_Connect1.EZB.servo.Releaseservo(servo.servoPortEnum.D5)

EzB_Connect1.EZB.servo.SetservoSpeed(servo.servoPortEnum.D4, 95)
EzB_Connect1.EZB.servo.SetservoPosition(EZ_B.servo.servoPortEnum.D4, 90) 'elbow
Thread.Sleep(5000)
EzB_Connect1.EZB.servo.Releaseservo(servo.servoPortEnum.D4)

EzB_Connect1.EZB.servo.SetservoPosition(EZ_B.servo.servoPortEnum.D0, 0) 'jaw
Thread.Sleep(2000)
EzB_Connect1.EZB.servo.Releaseservo(servo.servoPortEnum.D0)

EzB_Connect1.EZB.servo.SetservoPosition(EZ_B.servo.servoPortEnum.D4, 88) 'elbow
Thread.Sleep(3000)
EzB_Connect1.EZB.servo.Releaseservo(servo.servoPortEnum.D4)

EzB_Connect1.EZB.servo.SetservoPosition(EZ_B.servo.servoPortEnum.D0, 0) 'jaw
Thread.Sleep(2000)
EzB_Connect1.EZB.servo.Releaseservo(servo.servoPortEnum.D0)

EzB_Connect1.EZB.servo.SetservoPosition(EZ_B.servo.servoPortEnum.D4, 75) 'elbow
Thread.Sleep(4000)
EzB_Connect1.EZB.servo.Releaseservo(servo.servoPortEnum.D4)


EzB_Connect1.EZB.servo.SetservoPosition(EZ_B.servo.servoPortEnum.D0, 0) 'jaw
Thread.Sleep(2000)
EzB_Connect1.EZB.servo.Releaseservo(servo.servoPortEnum.D0)

EzB_Connect1.EZB.servo.SetservoPosition(EZ_B.servo.servoPortEnum.D3, 65) 's piviot
Thread.Sleep(2000)
EzB_Connect1.EZB.servo.Releaseservo(servo.servoPortEnum.D3)

EzB_Connect1.EZB.servo.SetservoPosition(EZ_B.servo.servoPortEnum.D2, 20) 'shoulder
Thread.Sleep(2000)
EzB_Connect1.EZB.servo.Releaseservo(servo.servoPortEnum.D2)


EzB_Connect1.EZB.servo.SetservoPosition(EZ_B.servo.servoPortEnum.D4, 98) 'elbow
Thread.Sleep(5000)
EzB_Connect1.EZB.servo.Releaseservo(servo.servoPortEnum.D4)


EzB_Connect1.EZB.servo.SetservoPosition(EZ_B.servo.servoPortEnum.D0, 80) 'jaw
Thread.Sleep(1000)
EzB_Connect1.EZB.servo.Releaseservo(servo.servoPortEnum.D0)

EzB_Connect1.EZB.servo.SetservoPosition(EZ_B.servo.servoPortEnum.D4, 70) 'elbow
Thread.Sleep(5000)
EzB_Connect1.EZB.servo.Releaseservo(servo.servoPortEnum.D4)

EzB_Connect1.EZB.servo.SetservoPosition(EZ_B.servo.servoPortEnum.D2, 48) 'shoulder
Thread.Sleep(2000)
EzB_Connect1.EZB.servo.Releaseservo(servo.servoPortEnum.D2)

EzB_Connect1.EZB.servo.SetservoPosition(EZ_B.servo.servoPortEnum.D3, 46) 's piviot
Thread.Sleep(2500)
EzB_Connect1.EZB.servo.Releaseservo(servo.servoPortEnum.D3)

EzB_Connect1.EZB.servo.ReleaseAllservos()

MsgBox("Done")

February 25 2013
Monday, 25 February 2013

Good Morning Jack Philips 1953 !

A MOST IMPRESSIVE Video & Thank You For Sharing Your Code !

I am looking for an OnLine C# & Microsoft Visual Studio TUTOR ?

I want to Pay-By-The-Hour ?

Is anyone available to do C# Tutoring via TeamViewer 7, or UltraVNC ?

Thank You All, & Best Wishes From Phoenix,

DougPope@cox.net, 602-246-1246(H)

http://www.ez-robot.com/Community/Forum/posts.aspx?threadId=2905

Saturday, 16 February 2013

Good Morning EZ-SDK C# Coders !

Early this morning I downloaded and successfully installed Microsoft Visual Studio Express (The Free Version) from the Microsoft Website:
http://www.microsoft.com/visualstudio/eng#downloads.

On the first Click of Tutorial 19 - Roomba.csproj, the project loaded and started showing me things that I have never seen before.

I feel like a Head-Start-Student, "1 and 1 is 2, 2 and 3 is 4; What's a 4 ?"

What is the FileName of the Graphic used for the Roomba Custom Movement Panel, and is it present in this release of EZ-SDK ?

Is anyone available to do C# Tutoring via TeamViewer 7, or UltraVNC ?

Thank You All, & Best Wishes From Phoenix,

DougPope@cox.net, 602-246-1246(H)

P.S. I am still trying to purchase a Full Set of OSMO's, Both 400 & 500 Series for our local Washington High School Robotics Club ?