Ultrasonic Sensor is not working in port 4.

This is where you talk about the NXJ hardware related topics such as the brick, sensors, LEGO pieces, etc.

Moderators: 99jonathan, roger, imaqine

Ultrasonic Sensor is not working in port 4.

Postby Katsunami » Mon Dec 13, 2010 4:23 pm

Today I have been busy testing some stuff using my NXT bricks, but found out that my ultrasonic sensors were not working. After testing using two sensors and two bricks, I could determine that the Ultrasonic sensor does not seem to work when connected to Port 4. This is the case for any combination of sensors and brick (4 combinations of course, in my case).

The only thing I changed in my code to get it working was SensorPort.S4 to SensorPort.S3, and I of course replugged the sensor to port 3. The Ultrasonic sensor works on port 1-3, while other sensors (at least the light sensor, haven't tested any others jet) seem to work at all ports including 4.

Other people over here who are using different environments (RobotC, BricxCC) -can- connect the Ultrasonic sensor to port 4 and use it normally.

Is there any reason for this? If so, I couldn't find it...
User avatar
Katsunami
New User
 
Posts: 10
Joined: Tue Nov 23, 2010 9:57 pm
Location: Netherlands

Postby skoehler » Mon Dec 13, 2010 5:12 pm

AFAIK, this has been fixed a long while ago. Not sure, whether this bug still exists in version 0.8.5. But certainly it's fixed in recent snapshots.
skoehler
leJOS Team Member
 
Posts: 1390
Joined: Thu Oct 30, 2008 4:54 pm

Postby gloomyandy » Mon Dec 13, 2010 5:34 pm

See this thread...
viewtopic.php?t=1883
User avatar
gloomyandy
leJOS Team Member
 
Posts: 3901
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Postby Katsunami » Mon Dec 13, 2010 6:32 pm

Thanks for the confirmation.

For this project, I cannot afford to go and use some "random" latest version of the classes.jar file. I rather have a version with known workarounds for known bugs, than a version that is just out and I'll have to wait and see what I encounter and hope that I or someone else can fix it somehow.

I'll try some newer classes.jar/snapshots at home, but for this project for which I need that Ultrasonic sensor, I'll just not plug it into port 4. The light sensor seems to work fine in there, and the Uss seems to work fine in three, so at the moment I'm happy with vanilla 0.85 :)
User avatar
Katsunami
New User
 
Posts: 10
Joined: Tue Nov 23, 2010 9:57 pm
Location: Netherlands

Postby gloomyandy » Mon Dec 13, 2010 8:27 pm

The thread that I posted has a fix to 0.85 just for this problem. It is what pretty much all users that have had either problems with port 4 or with the Color Sensor are using. It is as close as anything that you will get that is a an official patch to 0.85 to fix this problem...

Andy
User avatar
gloomyandy
leJOS Team Member
 
Posts: 3901
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Postby s.frings » Tue Dec 21, 2010 3:53 pm

I had the same issue some month ago and I noticed that the problem does not occur with the snapshot from 25.11.2010. If you like, you could download a complete inofficial Multi-Platform Lejos from my homepage. It consist of release 0.8.5 which has been upgraded with the snapshot and sources from that date.

http://stefanfrings.de/mindstorms/lejos ... -11-25.zip
s.frings
Active User
 
Posts: 131
Joined: Tue Jul 20, 2010 2:01 pm


Return to NXJ Hardware

Who is online

Users browsing this forum: No registered users and 0 guests

more stuff