Programming toolkit for ev3dev
This is a GLib/GObject based library that provides a number of programming interfaces for ev3dev, including user interface and device driver interface. It is written in vala, but since it uses GObjects, it can be used with many languages via GObjectIntrospection.
For an example of how it is used, checkout brickman.
This is currently in the development stages and is unstable. The device driver interfaces require the latest ev3dev kernel (currently v3.16.7-ckt4-ev3dev1).
Besides dependencies included in trusty, we need vala >= 0.24, which you can get from the vala-team PPA, and libgrx which is part of the ev3dev package repository.
To get something usable on the EV3 brick, you should compile using brickstrap.
# include install build depends
$ sudo apt-get install cmake valac libgirepository1.0-dev \
libgudev-1.0-dev libncurses5-dev libgrx-dev
# if you are building for desktop (see below) you also need
$ sudo apt-get install libgtk-3-dev
# clone the git repo
$ git clone --recursive git://github.com/ev3dev/ev3devKit
# create a build directory (not in cloned ev3devKit directory).
$ mkdir build
$ cd build
$ cmake ../ev3devKit
$ make
You can add additional build option to the cmake
command. Note: you need to
delete everything in the build directory when changing cmake
options to
ensure that they take effect (you can use nuke.sh
to do this).
- Enable debugging:
-DCMAKE_BUILD_TYPE=string:Debug
- Build additional library for running on a desktop:
-DEV3DEVKIT_DESKTOP=bool:Yes
- Do not build the demo programs:
-EV3DEVKIT_BUILD_DEMO=bool:No
When building for the desktop, one can run the demos using make run<tab>
. In
order to run them on the device, copy the demos over or share the folder via NFS
or sshfs with the EV3. When copying them to /home/user, the demos are runable
from the file-browser.
API docs are at http://www.ev3dev.org/ev3devKit/ev3devkit/index.htm