EZ-SDK Mono

Download

EZ-SDK Mono Version 2016.05.13.00

The powerful EZ-SDK Mono Framework enables Mono or C++ programmers to control the EZ-B Robot Controller. Your custom program will communicate with the EZ-B Robot Controller over a wireless connection from your Raspberry Pi or Linux PC. The SDK exposes many powerful functions that are included in our graphical EZ-Builder application.

Release notes

Raspberry Pi Installing Mono

Step 1: Download a Raspberry Pi disk image from this website. At the time of writing there is a bug with Mono on Debian – due to an issue with a rounding function in the Maths libraries which also causes problems with DateTime. For that reason I downloaded and installed the Arch Linux image. Arch is pitched as the “hardcore” distribution for the Pi but I actually found it very easy to use. Follow the instructions to get your disk image onto an SD card and boot up your Pi.

Step 2: Log in to your Pi using the standard username and password. If you’ve used Debian you’ll need to answer a few setup questions before you can log in.

Step 3: Make sure your system is up to date. In this step, we use the package manager to download the latest libraries. New libraries are released at least once a week and contain bug fixes and optimisations to make your Pi run quicker. You should repeat this step every week or so to make sure you’re up to date.

Debian:

sudo apt-get update
sudo apt-get upgrade
 
Arch:
 
sudo pacman -Syu
 

Step 4: Get a text editor such as emacs or vi. Here is how you install emacs...

Debian:

sudo apt-get install emacs
 
Arch:
 
sudo pacman -S emacs
   

Step 5: Install Mono

Debian:

 
sudo apt-get install mono-complete
 
Arch:
  
sudo pacman -S mono-complete
 

Step 6: Download, extract and the EZ-Mono archive to your project folder. Optionally, you can set the MONO_PATH variable to a folder holding the dll or use the gacutil to install into the global assembly collection.

 
          sudo gacutil -i EZ_B.dll
 

Step 7: Write some code. We’re not using a Solution or a Project here, just writing a simple source file an compiling it. This listing shows how to create a directory for the files and open the source file in a text edtor. Debian and Arch are identical from this point on.

 
mkdir EZTest
cd EZTest
emacs EZTest.cs
 

Type or paste the following code into the emacs editor...

  
using System;
using EZ_B;
  
public class HelloWorld {

    static EZB _ezb;

    public static void Main() {

        _ezb = new EZB();

        Console.WriteLine("Connecting to EZ-B v4...");

        _ezb.Connect("192.168.1.1");

        if (!_ezb.IsConnected) {

            Console.WriteLine("Unable to connect to EZ-B v4");

            return;
        }

        Console.WriteLine("Hello World, I am moving servo d0 to position 90!");
 
        _ezb.Servo.SetServoPosition(Servo.ServoPortEnum.D0, 90);

        _ezb.Disconnect();
    }
}
 

Step 8: Compile the code using dmcs or the recommended mcs, which is for .Net 4. This will generate an EXE file, and that can be executed with mono. To find out more about what mono compilers work with each version, click here.

 
mcs -reference:EZ_B.dll EZTest.cs
mono EZTest.exe