Problem running NXJ programs

This is where you talk about the NXJ software itself, installation issues, and programming talk.

Moderators: imaqine, 99jonathan, roger

New User
Posts: 5
Joined: Mon Feb 05, 2007 2:41 am

Problem running NXJ programs

Postby ck » Mon Feb 05, 2007 3:01 am


I've installed the leJOS NXJ firmware and I am trying to run same of the sample programs. When I use the .bin files
(i.e. TestMotor.bin which is provided in the samples folder) everything runs ok without a problem.

However, when I tried to complile the file using lejosjc and lejoslink the resulting .bin file did't run on the nxt.
The motor was making a funny noise and it was hardlly working. I didn't get any error messages at any point.

The only weird thing is that the .bin file was much bigger that the one provided in the samples folder....

Do you think is the jdk version that I use? I've tried 1.6 and jdk1.5.0_05 but the problem remains....

leJOS Team Member
Posts: 965
Joined: Mon Feb 05, 2007 1:27 pm

Postby lawrie » Mon Feb 05, 2007 1:47 pm

It looks like I did not rebuild the TestMotor example after we made some changes to the Motor class just before the release of the alpha version.

The bin file is bigger because we added a lot of methods to the Motor class. Your problem is the value of setSpeed. When I wrote this example 100 meant full speed, but it now sets the speed in degrees of rotation per second. Changing the value to 400 or more should make the example work. A value of 100 is not overcoming internal friction with your current battery level.

This is not a very good example. It was one of the first I wrote when we first got Motors and Sensors working. It will be removed in the next release.


New User
Posts: 5
Joined: Mon Feb 05, 2007 2:41 am

Postby ck » Wed Feb 07, 2007 3:06 am

OK.... I changed the speed value and everything works fine now!!!


Return to “NXJ Software”

Who is online

Users browsing this forum: No registered users and 2 guests