Welcome to Synthiam!

The easiest way to program the most powerful robots. Use technologies by leading industry experts. ARC is a free-to-use robot programming software that makes servo automation, computer vision, autonomous navigation, and artificial intelligence easy.

Get Started
Asked — Edited

Converting C# To VB

is the VB implementation as "complete" as the C# implementation? For instance, the following is a line in C#: _ezb.ADC.GetADCValue(ADC.ADCEnum.ADC_0);. I can not find a VB equivalent, all I find for VB is:

How do I get the ADC value?



Upgrade to ARC Pro

Become a Synthiam ARC Pro subscriber to unleash the power of easy and powerful robot programming

as a followup, is there a way to read the DLL so I can see all the methods in VB?

The following code extends the VB example within the SDK Download. I added a button (named btnGetADC) and a Label (named lblADCVal).

When the button is pressed, the value of the ADC0 will be displayed in the lblADCVal:)


Public Class Form1

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

TrackBar1.Minimum = EZ_B.Servo.SERVO_MIN
TrackBar1.Maximum = EZ_B.Servo.SERVO_MAX
TrackBar1.Value = EZ_B.Servo.SERVO_CENTER
End Sub

Private Sub TrackBar1_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrackBar1.Scroll

EzB_Connect1.EZB.Servo.SetServoPosition(EZ_B.Servo.ServoPortEnum.RB0, TrackBar1.Value)
End Sub

Private Sub btnGetADC_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGetADC.Click

lblADCVal.Text = String.Format("{0} Volts", EzB_Connect1.EZB.ADC.GetADCVoltage(EZ_B.ADC.ADCPortEnum.ADC0))
End Sub
End Class