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
0
votes
2 answers

Measuring EV3 Color Sensor Reflected Light Intensity via leJos

I have a question: Via leJos, I want to control my ev3 color sensor which is connected to port 2. But actually when I looked at the EV3ColorSensor class, I couldn't find any method which I can measure the reflected light intensity of my colorsensor…
0
votes
2 answers

Connect to nxt with java bluetooth

I would like to connect to my mindstorms nxt robot over bluetooth with java. Also keep in mind that I have lejos installed. Lejos includes classes to connect with the robot. Thank you so much I have spent weeks trying to figure this out and would…
www139
  • 2,111
  • 3
  • 13
  • 8
0
votes
2 answers

Briefly taking control of an object owned by another thread

I hava a Java-controlled robot. It has an ultrasonic sensor that is rotated back and forth by Motor B. Normally, I have a separate thread that scans the environment and sends the collected data to another machine in order to draw a map. However,…
user1582024
  • 715
  • 1
  • 6
  • 15
0
votes
0 answers

Using lejos for NXT with Linux

I have a Mindstorms NXT and only could flash it with sudo right? So now I want to upload a test program, but: Initializing LeJOS JDK at /opt/lukas/lejos Linking ... Program has been linked successfully Uploading ... leJOS NXJ> Failed to find any…
irwisch
  • 1
  • 1
0
votes
0 answers

What does Lejos NXJ error 76 mean?

We're getting an error 76 for code that worked outside the lejos runtime. What does error 76 mean?
AJcodez
  • 31,780
  • 20
  • 84
  • 118
0
votes
1 answer

Android error x must implement the inherited abstract method

I have a class called: public class NXTCommAndroid implements NXTComm Eclipse gives the following red error The type NXTCommAndroid must implement the inherited abstract method NXTComm.search(String) the IDE suggests to either make the class…
TroothHertz
  • 186
  • 2
  • 17
0
votes
0 answers

how to build a 5 wall map in lejos-nxj with NXT brick

I have an NXT robot. I want to map a room without any obstacles, and "give" this map to the robot. I have this sample code: // Create a rudimentary map: Line[] lines = new Line[3]; lines[0] = new Line(75f, 100f, 100f, 100f); lines[1] = new…
shlomi
  • 523
  • 3
  • 13
  • 26
0
votes
2 answers

NXT - Tortoise and Hare - follow moving object - Theoretical

I'm going through Robotics past papers as a revision before the exam, and I found one problem which seems very confusing. My department does not provide answers to past papers, so I can't check if I'm right. public class Question4i{ public…
LucasSeveryn
  • 5,984
  • 8
  • 38
  • 65
0
votes
2 answers

How do I set up a Java-like language (LeJOS NXJ) in Visual Studio 2005 that uses an external compiler?

Recently, I installed the JDK and a java library called LeJOS NXJ, for controlling a LEGO Mindstorms robot. I'd like to be able to set up the language to run through visual studio, which offers J# color coding. The command line to compile the…
Eric
  • 95,302
  • 53
  • 242
  • 374
0
votes
2 answers

Fastest algorithm for locating an object in a field

What would be the best algorithm in terms of speed for locating an object in a field? The field consists of 18 by 18 squares with side length 30.48 cm. The robot is placed in the square (0,0) and its job is to reach the light source while avoiding…
lbj-ub
  • 1,425
  • 2
  • 19
  • 34
0
votes
2 answers

bluetooth communication in nxj

I'm nxj beginner. I have some questions about bluetooth communication between PC and brick. First, when bluetooth communication occurs, where is the birthplace processing this datas? In other words, I want to know whether these datas will be…
0
votes
1 answer

Grouping RGB colors for NXT brick

I am trying to write an extension in netlogo for Nxt brick . To connect the brick , I am using Lejos. I have a problem with color sensor. I want to write a simple method which returns sensor color as a number such as yellow : 1, red :2 etc. But…
Ecrin
  • 246
  • 5
  • 21
-1
votes
1 answer

LeJOS GyroSensor sample always 0

I would like to read the current angle from my Ev3GyroSensor, however the returned value is always 0. I tested multiple Ports nothing worked. If I test the sensor with the LeJOS integrated Tool, everything works fine. EV3GyroSensor ev3GyroSensor…
1 2 3 4
5