Questions tagged [lejos-nxj]

leJOS (pronounced like the Spanish word "lejos" for "far") is a tiny Java Virtual Machine. In 2006 it was ported to the LEGO NXT brick.

leJOS (pronounced like the Spanish word "lejos" for "far") is a tiny Java Virtual Machine. In 2006 it was ported to the LEGO NXT brick.

leJOS NXJ includes all the classes in the NXJ API as well as the tools used to upload code to the NXT brick.

leJOS NXJ offers the following:

  • Object-oriented language (Java)
  • Preemptive threads (tasks)
  • Arrays, including multi-dimensional
  • Recursion
  • Synchronization
  • Exceptions
  • Most of the java.lang, java.util and java.io classes
  • A well-documented Robotics API
71 questions
8
votes
4 answers

What is the difference between the Lego Mindstorms 1.0 and 2.0

I am thinking about buying a mindstorms kit (I don't currently own one but I have used 1.0 at university) and I am a bit unsure as to the benefits of 2.0 over 1.0. I have seen other posts on the subject all saying generally 2.0 is better but I have…
Gavimoss
  • 365
  • 2
  • 4
  • 20
7
votes
4 answers

How to do Java serialization without Reflection?

I am working on a Lego Mindstorm NXT robot, which do not support Java reflection. For some reason (the parallel creation of a simulator and an actual mindstorm) we want to use Serialization to exchange Java objects. The problem is that serialization…
Steven Roose
  • 2,535
  • 4
  • 24
  • 44
6
votes
4 answers

Can I distribute a JDK with my application?

I am working on an application called Enchanting. The application, based on Scratch, emits Java source code and compiles it for uploading onto LEGO Mindstorms NXT Robots. While the application is very early, users have a hard time installing…
Clinton Blackmore
  • 2,132
  • 2
  • 22
  • 30
3
votes
1 answer

Unable to Load LeJOS NXT Comm Driver

I have been trying to generate an interface with my NXT robot, using the LeJOS libraries. When I run the code I get the following error printed to the console: lejos.pc.comm.NXTCommException: Cannot load NXTComm driver at…
Andrew Gies
  • 719
  • 8
  • 20
3
votes
2 answers

Bluetooth error: Native Library bluecove_arm not available

I'm having some difficulty running a leJOS pc program on my Raspberry Pi. It works on my PC. I get an error stating: "Native Library bluecove_arm not available" Bluetooth works fine otherwise using: "hcitool scan" I can't find a compiled version of…
krex
  • 295
  • 3
  • 8
  • 21
3
votes
1 answer

lejos filewriting to the NXT

I am new to java and lejos so please don't blame me if i'm asking rather dumb questions. I was trying to let the lego ultrasonic sensor scan a 360 degree area around my nxt by rotating it on a motor. Every 5 degrees it saves the distance to a .txt…
Rob
  • 51
  • 11
2
votes
1 answer

Lejos (java) and interfaces // UML suggestion

I created a project with lejos 0.9. Now what i know is that i'm only able to upload and compile classes (from java to nxj files) with the eclips plugin when the class has a public static void main(String[] args) . But i have to get more classes and…
Olivier_s_j
  • 4,939
  • 21
  • 72
  • 125
2
votes
1 answer

Add a custom JDK to Netbeans 6.9.1

I'm trying to add a custom JDK to Netbeans 6.9.1 on OSX 10.6.5. The JDK is just a collection of classes created for leJOS, a Java package for the Lego NXT robot. I can't just add the classes for this JDK to the existing Java JDK because there are a…
Nick Hawes
  • 297
  • 2
  • 14
2
votes
0 answers

How does getAngleIncrement work in LeJOS API?

I'm working on a robot project using Lego NXT running the LeJOS API. I need to sum up the angles my robot makes. I found out there was a method getAngleIncrement() that seems to be doing just so but I can't be sure. Here's all the documentation I've…
2
votes
1 answer

How to remove the java standard library from a gradle project?

How can one make Gradle not include the Java standard library as a dependency to IntelliJ IDEA project? I am using IntelliJ and every time I Refresh all Gradle projects: IntelliJ adds the Java standard library back to the project as an external…
Eric
  • 12,320
  • 4
  • 53
  • 63
2
votes
2 answers

Lejos giving error on initializing matrix

We are trying to build a robot and for the robot to understand where he is right now we are going to use a matrix. So i'm calling out the matrix. java without anything from the main. And then trying to use the initMatrix, it just gives me an…
2
votes
4 answers

Is this valid Java code?

I'm using Eclipse, and it is perfectly happy with the following code: public interface MessageType { public static final byte KICK = 0x01; public static final byte US_PING = 0x02; public static final byte GOAL_POS = 0x04; …
Eric
  • 87,154
  • 48
  • 211
  • 332
2
votes
4 answers

How can I interrupt a sequence of procedures in Java?

I have a bunch of procedures that need to be executed successively until either they are all executed, or a certain condition is met. Here's the basic code that needs to be executed until a condition is met: public boolean search() { …
Eric
  • 87,154
  • 48
  • 211
  • 332
1
vote
1 answer

Java generated images can't be use in code that generated them?

I am trying to write a NXT Robot simulator with lejOS where the robot can avoid obstacles, but I want the obstacles to be generated in the code. The code below allows for the creation of the Circle.jpg, but the code crashes if it tries to use the…
1
vote
5 answers

Getting Exception in thread "main" java.lang.NullPointerException error

I am writing a small java code to generate random values: import java.util.Random; public class Rann { static Random rand; public static void main(String args[]){ int i; for(i=0;i<15;i++) …
Monty Swanson
  • 508
  • 12
  • 32
1
2 3 4 5