ArticleslgStudy

computer science

LeJOS

LeJOS is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand LeJOS rather than just read about it. In short: leJOS is a firmware replacement for Lego Mindstorms programmable bricks. Different variants of the software support the original Robotics Invention System, the NXT, and the EV3.

Key takeaways

  • LeJOS belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect LeJOS to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of LeJOS from memory before moving on to harder problems.

Reference excerpt

leJOS is a firmware replacement for Lego Mindstorms programmable bricks. Different variants of the software support the original Robotics Invention System, the NXT, and the EV3. It includes a Java virtual machine, which allows Lego Mindstorms robots to be programmed in the Java programming language. It also includes 'iCommand.jar' which allows you to communicate via bluetooth with the original firmware of the Mindstorm. It is often used for teaching Java to first-year computer science students. The leJOS-based robot Jitter flew around on the International Space Station in December 2001.

Pronunciation According to the official website:

In English, the word is similar to Legos, except there is a J for Java, so the correct pronunciation would be Ley-J-oss. If you are brave and want to pronounce the name in Spanish, there is a word "lejos" which means far, and it is pronounced Lay-hoss. The name leJOS was conceived by José Solórzano, based on the acronym for Java Operating System (JOS), the name of another operating system for the RCX, legOS, and the Spanish word "lejos."

History leJOS was originally conceived as TinyVM and developed by José Solórzano in late 1999. It started out as a hobby open source project, which he later forked into what is known today as leJOS. Many contributors joined the project and provided important enhancements. Among them, Brian Bagnall, Jürgen Stuber and Paul Andrews, who later took over the project as José essentially retired from it. As of August 20, 2006, the original leJOS for the RCX has been discontinued with the 3.0 release. Soon afterwards, iCommand, a library to control the NXT from a Bluetooth-enabled computer via LCP, was released. This library made use of the standard Lego firmware. This library was later superseded by leJOS NXJ 0.8. In January 2007, a full port to the new Lego Mindstorms NXT was released as a firmware replacement. This is far faster (x15 or so) than the RCX version, has more memory available, a menu system, Bluetooth support using the Bluecove library, and allows access to many other NXT features. In 2008, versions 0.5, 0.6 and 0.7 were released. In addition to numerous improvements to the core classes, the Eclipse plugin was released along with a new version of the tutorial. In 2009, there were 2 more major releases: 0.8 and 0.85. In May 2011 0.9 was released. Broadly speaking, the releases have concentrated on improvements to navigation algorithms, as well as support for numerous 3rd party sensors and the Eclipse plug-in. In 2013, development began on a port to the Lego Mindstorms EV3 brick. In 2014, the 0.5 and 0.6 alpha versions were released. In 2015, beta versions 0.9 and 0.9.1 were released. Since November 2014 leJOS is used in a slightly adapted version also in the open-source project Open Roberta.

Architecture leJOS NXJ provides support for access to the robot's I²C ports. This allows access to the standard sensors and motors (ultrasonic distance sensor, touch sensor, sound sensor and light sensor). Other companies, such as MindSensors and HiTechnic have extended this basic set by providing advanced sensors, actuators and multiplexers. leJOS NXJ includes Java APIs for these products. By taking advantage of the object-oriented structure of Java, the developers of LeJOS NXJ have been able to hide the implementation details of sensors and actuators behind multiple interfaces. This allows the robotics developer to work with high-level abstractions without having to worry about details like the hexadecimal addresses of hardware components. The project includes implementations of the commonly used feedback controller, the PID controller and the Kalman filter noise reduction algorithm. leJOS NXJ also provides libraries that support more abstract functions such as navigation, mapping and behavior based robotics. Here is a simple leJOS program:

Community Since the first alpha release of leJOS NXJ in 2007, the project has had a consistently active following.

Between January 2007 and October 2011 there were over 225,000 downloads In 2011 the downloads averaged between 4000 and 6000 a month In 2011 over 500 topics were discussed in the forums. Each topic often generated several hundred posts. Between May 2012 and March 2013 there were over 36,000 download of release 0.91 The core development team has been a relatively small group. Contributions are accepted from other members of the community. Several of the interfaces to third party sensors and actuators have been contributed by members outside the core team. The platform has been used in university robotics courses, undergraduate research projects and as a platform for robotics research.

NXJ and the Java platform As leJOS NXJ is a Java project, it builds on the wealth of functionality inherent in the Java platform. There are leJOS NXJ plugins for the two leading Java IDEs: Eclipse and NetBeans. Robotics developers can take advantage of the standard functionality of an IDE (code completion, refactoring and testing frameworks) as well as point-and-click implementation of NXJ functions: compiling, linking and uploading. A wealth of java open source projects (such as Apache Math) are likewise available to the NXJ robotics developer.

See also

List of Java virtual machines List of robotics software Lego Mindstorms Robotics Invention System URBI Robotics suite

References

Further reading Brian Bagnall (2011). Intelligence Unleashed: Creating LEGO NXT Robots with Java. Variant Press ISBN 0-9868322-0-0 Brian Bagnall (2002). Core LEGO Mindstorms Programming. Prentice Hall PTR. ISBN 0-13-009364-5 Giulio Ferrari et al. (2002). Programming LEGO Mindstorms with Java. Syngress. ISBN 1-928994-55-5 Max Schöebel et al. (2015). Roberta - EV3 Programmieren mit Java. Fraunhofer Verlag. ISBN 978-3-8396-0840-1

External links Official website Step-by-Step Instructions for installing and running leJOS Installing NXT and leJOS on 64 bit Windows Ebook: Develop leJOS programs step by step Archived 2022-03-11 at the Wayback Machine

Worked examples

Example 1 — a first encounter with LeJOS

Start with the simplest possible case. Write down what LeJOS claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to LeJOS before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about LeJOS ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of LeJOS

In research
LeJOS appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses LeJOS in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
LeJOS is common in secondary-school and first-year university syllabi. It links to neighbouring topics 1999 in robotics, 1999 software, Embedded operating systems, so understanding it makes those chapters shorter.
In everyday life
Look for LeJOS outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “LeJOS” →

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study LeJOS in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what LeJOS means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain LeJOS out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is LeJOS in simple terms?

leJOS is a firmware replacement for Lego Mindstorms programmable bricks. Different variants of the software support the original Robotics Invention System, the NXT, and the EV3.

Why does LeJOS matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study LeJOS?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on LeJOS.

Tags

  • 1999 in robotics
  • 1999 software
  • Embedded operating systems
  • Java virtual machine
  • Lego Mindstorms
  • Robot programming languages
  • Software using the GNU General Public License
  • Software using the Mozilla Public License

Keep exploring