LeJOS libraries

A program written for LeJOS running on EV3 and intended to control EV3's hardware needs some way to interface with said hardware. The purpose of LeJOS is to provide an API (a set of classes and methods) that serves as this interface. This API is packaged as the source code and the libraries that you will download and integrate with your projects. The easiest way to do this is using Git (available on Debian/Ubuntu systems in the Git package and installed using sudo apt-get install git) by running the following command (in the folder where you want to save the code):

git clone git://git.code.sf.net/p/lejos/ev3 lejos-ev3

This will create a folder named lejos-ev3 and download the latest code into it (this can take several minutes to complete). Along with the API, you will get a number of sample projects that are extremely useful for understanding how to use the LeJOS API in order to control EV3.

It is recommended that you create a separate folder called lejos where you will save all your programs intended for EV3. Gradle only looks for the source code inside a project's root folder. Therefore, it is required that the necessary LeJOS library classes be copied inside the project's root folder. Create a subfolder named ev3 inside every project's root folder. From the lejos-ev3 Git repository, copy the DBusJava and ev3classes folders into it. This places these support classes in a central location which is accessible from the rest of your source code.

The directory structure of the project's root folder now looks as follows:

root_folder
    | ---- ev3
         | ---- DBusJava
         | ---- ev3classes
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.223.151.158