Rubik's Cube Solving Robot icon Rubik's Cube Solving Robot — Control a custom ARC robot to manipulate and solve a Rubik's Cube using calibrated arms and grippers; integrates with Thingiverse build. Try it →
Australia
Asked — Edited
1 Participant

Movement Pannel In Vb Express 8

hi all i have a form with a connect panel working ok i have Movement Panel and want to know how to assign ports to it can anyone help with the code needed?


 Private Sub EzMovement1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EzMovement1.Load
        EzB_Connect1
        EZB.Movement.ServoWheelLeftModifiedPort(EZ_B.Servo.ServoPortEnum.D10)

    End Sub

ARC Pro

Upgrade to ARC Pro

Stay on the cutting edge of robotics with ARC Pro, guaranteeing that your robot is always ahead of the game.

Author Avatar
Netherlands
#1  

you can assign the port like you did :

EZB.Movement.ServoWheelLeftModifiedPort(EZ_B.Servo.ServoPortEnum.D10)

the d10 is the port on your ezb

:)

Author Avatar
Australia
#2  

hi i get error

Warning 1 Access of shared member, constant member, enum member or nested type through an instance; qualifying expression will not be evaluated.

Error 2 Expression is not a method.


 With EzB_Connect1
            .EZB.Movement.ServoWheelRightModifiedPort(EZ_B.Servo.ServoPortEnum.D5)
          
        End With
Author Avatar
Netherlands
#3  

hi there baloo,

did you do it on this way ?


Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        EzB_Connect1.EZB.Movement.ServoWheelLeftModifiedPort = EZ_B.Servo.ServoPortEnum.D0
        EzB_Connect1.EZB.Movement.ServoWheelRightModifiedPort = EZ_B.Servo.ServoPortEnum.D1

        EzB_Connect1.EZB.Movement.MovementType = EZ_B.Movement.MovementTypeEnum.ModifiedServo
End Sub

and then the buttons


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        EzB_Connect1.EZB.Movement.GoForward()
    End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        EzB_Connect1.EZB.Movement.GoLeft()
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        EzB_Connect1.EZB.Movement.GoRight()
    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
        EzB_Connect1.EZB.Movement.GoStop()
    End Sub

First you define everything and than use them:)

Author Avatar
Australia
#4  

hi i will try it when i get out of hospital( i had a heart attack ) :)

Author Avatar
Netherlands
#5  

Ohh, ok, take it easy, take your time, if you need help with programming. I'm not a star but every little bit helps

Author Avatar
Australia
#6  

hi i got this to work


EzB_Connect1.EZB.Movement.ServoWheelLeftModifiedPort = EZ_B.Servo.ServoPortEnum.D10
EzB_Connect1.EZB.Movement.ServoWheelRightModifiedPort = EZ_B.Servo.ServoPortEnum.D11

 EzB_Connect1.EZB.Movement.MovementType = EZ_B.Movement.MovementTypeEnum.ModifiedServo

but not the 5 button's on the movement pannel

Author Avatar
Netherlands
#7  

can you attach your code so i can have look.

so i see you have your wheels on d10 and d11

if you want i can make a little example for you if you give your ports and equipment.

Author Avatar
Australia
#8  

hi i just have a form with a connect panel and movement panel i can assign motors see post #7 but when clicking on and button on the movement nothing happens i try to unload my project(zip)