leJOS

from Wikipedia, the free encyclopedia

leJOS is a Java - operating system for programmable Lego -stones Lego Mindstorms RCX (leJOS RCX) NXT (leJOS NXJ) and EV3 (leJOS EV3). This software allows you to program the control of Lego constructions in Java. For this purpose, part of the Java Virtual Machine was ported to the RCX / NXT .

leJOS is distributed as free software under the terms of the Mozilla Public License 1.0 (MPL).

history

leJOS was originally developed under the name TinyVM by José Solórzano in 1999. It started as a hobby open source project and only later became leJOS as it is known today. Many contributors joined the project and developed important extensions. Among the contributors were Brian Bagnall, Jürgen Stuber and Paul Andrews, who later took over the project after Solórzano withdrew from it.

application

leJOS is often used for training purposes or in computer science training to teach the basics of programming in Java. Using leJOS, the autonomous robot Jitter was developed in 2001 as part of a competition , which was then transported to the ISS space station . Under the conditions of weightlessness , jitter is able to move independently and purposefully and to collect parts that wander around.

Lego Mindstorms NXT has also been supported by leJOS since 2006 . In addition to many new features, Bluetooth is now also supported.

Since autumn 2013, a port to the hardware generation Lego Mindstorms EV3, which was released in summer 2013, has been in progress. Although still in beta, Bluetooth and WiFi are supported in addition to the new hardware (motors, sensors).

Since November 2014, leJOS has also been used in a slightly adapted version in the open source project Open Roberta .

programming

Programming with leJOS is based on Java. The RCX or NXT or EV3 module used is flashed with an adapted JVM (Java Virtual Machine). Programs can then be loaded onto the LEGO block using the tools supplied.

Example (Hello World)

The following sample code demonstrates programming using a Hello World program :

  import lejos.nxt.*;
  public class HelloWorld
  {
    public static void main (String[] args)
    {
     System.out.println("Hello World");
     Button.waitForAnyPress();
    }
  }

Added value compared to Lego software

  • Sophisticated parallel processing through multithreading including all Java tools (synchronize, the package java.util.concurrent)
  • easy way to version the source code with version control systems
  • Robotics API : behavior-based robotic, control models for steering and chain drive robots, abstract navigation classes

While the original Lego software is geared towards the needs of technically interested children and young people, leJOS is aimed more at adult hobbyists.

leJOS EV3

With the EV3 generation, the Lego building block has been significantly expanded and is now based on a Linux system. Oracle itself offers a version of the current Java Runtime ported to ARM , so that no noticeable restrictions compared to other systems affect the development of its own programs. With the SD slot of the EV3, it is no longer necessary to flash the original firmware - leJOS EV3 is started from a bootable SD card without changing the data stored on the Lego building block. WiFi dongles for the USB port are also supported, so that communication (debugging, transferring programs, even a login via SSH directly to the Lego block is possible at any time) without a cable connection.

bibliography

  • Brian Bagnall: core LEGO Mindstorms Programming . Prentice Hall PTR, 2002, ISBN 0-13-009364-5 (English)
  • Giulio Ferrari et al .: Programming LEGO Mindstorms with Java . Syngress, 2002, ISBN 1-928994-55-5 (English)
  • Thorsten Leimbach et al .: Roberta - Programming with Java . Fraunhofer IRB, 2009, ISBN 978-3-8167-8401-2 (in German)
  • Max Schöbel, Thorsten Leimbach, Beate Jost: Roberta - EV3 programming with Java . Fraunhofer IRB, 2015, ISBN 978-3-8396-0840-1 (in German)

Web links

Individual evidence

  1. http://www.nasa.gov/mission_pages/station/research/experiments/Konstructor.html