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

jackphillips1953

USA

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.


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")

By — Last update

ARC Pro

Upgrade to ARC Pro

Get access to the latest features and updates before they're released. You'll have everything that's needed to unleash your robot's potential!

#1  

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)

https://synthiam.com/Community/Questions/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 ?