Today I'd updated my NXT firmware from Lejos 0.8 to 0.85. Well, since I did all I got problems.

First, the ultrasonic sensor did not respond. I could see in the forum they had a problem with the I2C port number 4, which did not respond with ultrasonic sensor. I changed the sensor of position and fixed

The next problem I've encountered and I have no solution is that the NXTCam camera does not respond well . The camera is connected to port 1, I tried to connect on different ports but still no answer.

I tried the following code to see the answer but always returns a value of 78:

Of course in the previous version of NXJ the code works well, even with more complex programs. The problem is that I intended to reinstall the older version and does not seem possible for the plugin for eclipse, once updated, can not return to the previous version.

Once built I'm not sure what you will have to do to get the Eclipse plug in to use the new jar file (I don't use Eclipse). You may want to test the changes using the command line tools to build and run your test code. To do this you will have to replace the classes.jar in your leJOS lib directory.

Andy

PS You should probably back things up before you start. But then you have probably learned that by now...

Hi,
Sorry I don't have an NXTCam so I can't test this for you. I suggest that you try the following...

1. Add calls to getVersion(), getProductId() and getSensorType() into your test code. This will check to see if the i2c code is talking to the device.

2. Have you tried the device with an older version of leJOS since you started getting the errors? If not can you do that (you can build your test program using the leJOS command line tools you don't need a working Eclipse to do it). That way we can establish that the fault is with the new version of leJOS.

3. Does it still work if you plug it into a PC?

4. Is there any way to reset the device? If so it is probably worth trying that.

5. You may want to add some delays between calls to the device. Newer versions of leJOS are faster than older ones. It may be that the device is not able to handle requests very close together.

I don't know why a value of 78 is returned for the number of objects - the same happens for me.

However, don't you need to make a call to enableTracking(true)? If I add that, I get sensible results.

Did this program work without a call to enableTracking or sendCommand('E'), at the 0.8 release? There do not seem to be any changes to the NXTCam class since the 0.8 release and I do not know of any other change to leJOS which is likely to affect this.

Great, Lawrie. The problem was the lack of calling to enableTracking() function. However I don't undertand, before I'd never used and worked perfectly in version 0.8. Well, now I may continue with my project.

Sooorry It was my mistake, I confused sendCommand Function ( 'E') with the function setTrackingMode (NXTCam.OBJECT_TRACKING). I always used the first function but recently I discovered the second and confused both.