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
73 questions
1
vote
3 answers

Lejos NXT - How can i detect a motor stall?

I try to build a Rubiks Cube Solver with 4 arms to grab the cube. I am using the lejos firmware version 0.9.0. My problem is how can i detect that a motor is stalled? For example: Motor.A rotates forward while the motor will be blocked/stalled, then…
joen
  • 634
  • 2
  • 5
  • 14
1
vote
2 answers

Java server code passes data to running java program

Is there a way I can pass data, from Java server code, to a Java program which is already running? I need to transfer data in real time, and I cannot integrate the two programs as they use a different compiler. Any ideas? Thanks ** ADDED INFO ** I…
user965304
  • 11
  • 3
1
vote
2 answers

LeJOS NXT movement in centimeters

I just started learning LeJOS programming and have a small probelm. I understand that I can measure movement distance in seconds and degrees. Is it possible to measure distance in centimeters, for instance. If yes, then how? (example please, if…
user721588
1
vote
1 answer

Lejos on OSX 10.7 (Lion)

I have Lion OSX installed on my Mac and I want to use my mac to develop on Lejos. I searched a lot for a decent install guide but I couldn't find one. So, I tried other tutorials online but it won't work. I first installed everything from the CD; I…
Olivier_s_j
  • 5,490
  • 24
  • 80
  • 126
1
vote
2 answers

installing lejos plugin in eclipse ( cannot load jfantom.dll )

So I am trying to get lejos (the software for lego robots) to work in my eclipse but when i click the lejos nxj item in the eclipse toolbar and select upload firmware I get the following error Building firmware image. VM file: C:\Program Files…
Xitcod13
  • 5,949
  • 9
  • 40
  • 81
1
vote
0 answers

Bluetooth connection from an android App to Lego Mindstorm EV3 brick

I am trying to create an Android App that sents small integers to my EV3 brick, so it can do Actions based on those numbers. My Problem ist that I can not create a Bluetooth Connection to the Brick in my own App. Has anybody experience with that and…
student
  • 21
  • 3
1
vote
1 answer

Multithreading Issue - JAVA thread.wait() on method that has to be used

I am currently working on a robot. I use an EV3 lego brick. My goal is to travel from point A to B using a method travelTo(x,y) using the shortest path. This method is in a thread name Drive, which contains all the methods used to control the…
1
vote
0 answers

Lejos EV3 Native Library bluecove_arm not available WR

I am woring on simple example to use Wii Remote control on a Ev3 using Lejos 0.9.1-beta. I am using WiiRemoteJ and Bluecove 2.1.1-SNAPSHOT and the example works on my Mac, but I have the next error on my EV3: Native Library bluecove_arm not…
1
vote
2 answers

Lejos RGB color sensor

Does anyone have a code example of using the NXT RGB Color Sensor in the Lejos programming language. I have tried several different uses of setType() and setMode() but to no avail.
Milhous
  • 14,473
  • 16
  • 63
  • 82
1
vote
1 answer

Lejos NXT: draw line and save image

I've managed to make a LineFollower program; added the feature of "memorizing" the path the robot just followed. The next step is to draw that path and save the image file in the brick and read it in the PC with the NxjBrowse. I thought I'd try…
DaPoox
  • 139
  • 4
  • 16
1
vote
1 answer

How to create own Event. How can I call a method when the value of a sensor changes?

I am currently working with the LeJOS Ev3 library and have programmed the following listener: import lejos.hardware.port.Port; import robots.ev3.drive.parts.LightSensor; public abstract class LightListener { protected int…
user5905437
1
vote
1 answer

Need Help Reading Data From Inputstream

I have a robot and a GUI application running on a GUI. I have a while loop on the robot side that is constantly sending data to the GUI. Before i send a value, i send first a value which the GUI will use to determine how many consecutive values it…
Edy Moore
  • 2,129
  • 3
  • 14
  • 10
1
vote
1 answer

LeJOS NXT Programming Sonic Sensor

I am trying to make a NXT Robot that has attached the Ultrasonic Sensor. It has to drive until the distance is 15, and then the engines have to stop. After it stops it has to turn, but it doesn't work. import lejos.nxt.*; public class test { …
lucafj2j282j
  • 879
  • 3
  • 13
  • 32
1
vote
2 answers

LeJOS: How write integer data succesfully to a file in NXT

I am working on some AI project which I am supposed to implement a controller using fuzzy logic on my NXT. In order to evaluate properly my control strategy, I have the need to track the information measured by the color sensor and the data that are…
Mudkip
  • 373
  • 6
  • 27
1
vote
1 answer

Java Lejos autonomous NXJ-robot threads causing trouble

I'm writing an java code to control a fairly simple robot, which should execute the following actions; PID-linefollower, ultrasonic detection and color detection. As this is my first program in java, I obviously have lots to learn in regards to…