EZ-SDK Windows

Download   NuGet   Manual
EZ-SDK for Windows Version 2016.05.06.00

The powerful EZ-SDK Framework enables C#, Visual Basic or C++ programmers in Windows 7/8/8.1/10 to control the EZ-B v4 Robot Controller for streaming audio/video, sensors, servos, and more. Your custom program will communicate with the EZ-B Robot Controller over a TCP/IP WiFi connection from your Laptop or PC. The SDK exposes every powerful function that is included in our graphical EZ-Builder application.

C# Example

The EZ-SDK contains over 50 examples in the downloadable archive package. In this example, the servo connected to port D0 will move according to the value of an ADC #0 input. For the ADC input, connect a POT or Sharp IR sensor.

*Note: Please read the README.TXT located in the EZ-SDK zip archive. It contains instructions to compile examples projects.

  
using System;
using System.Windows.Forms;
using EZ_B;

namespace Tutorial_3_Move_Servo_With_ADC {

  public partial class Form1 : Form {

    EZB _ezb = new EZB();

    public Form1() {

      InitializeComponent();
    }

    private void Form1_Load(object sender, EventArgs e) {

      _ezb.Connect("192.168.0.1");

      timer1.Interval = 250;
      timer1.Start();
    }

    private void timer1_Tick(object sender, EventArgs e) {

      if (!_ezb.IsConnected) 
        return;

      int adc = _ezb.ADC.GetADCValue(ADC.ADCPortEnum.ADC0);

      int servoPosition = Convert.ToInt16(Functions.GetScalarFromRange(180, 255, 0) * adc);

      label1.Text = string.Format("{0} / {1}", adc, servoPosition);

      _ezb.Servo.SetServoPosition(Servo.ServoPortEnum.D0, servoPosition);
    }
  }
}