Mindsensors DIST-Nx

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

Moderators: roger, imaqine, 99jonathan

mdsmitty
Novice
Posts: 78
Joined: Tue Feb 27, 2007 3:07 am
Contact:

Mindsensors DIST-Nx

Postby mdsmitty » Mon Jan 21, 2008 9:47 pm

Hi all,
I got a Optical Distance sensor from Mindsensors the other day. i noticed that there was not a class for this in the API and I started working on one. Everything looks to be working fine and i'm almost done. But i have two questions related to this little project.

How would i go about submitting this class to be in the next release?

ADPA is off by default and i notice if i call setAddress(0x02); the sensor no longer works. is setAddress() only to be called if ADPA is enabled?

I also saw mindsensors has the RCX Sensor Mux in beta has any one applied to get one of the test muxs? I'm emailing them to apply but i don't want to do double work if someone is already working on a class.

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

Postby lawrie » Mon Jan 21, 2008 11:05 pm

If you send me the java source for your new class at lawrie.griffiths@ntlworld.com, I will add it to the next release.

setAddress is not dependent on ADPA. What do you expect setAddress to do? All the setAddress method in I2CSensor does is tell leJOS what I2C address the sensor uses. leJOS addresses are shifted one bit from the addresses given in the mindsensors documentation, so address 1 in leJOS is address 0x02 in the documentation. This needs explaining in the javadocs.

I have not heard of any of the developers for a bets RCX Sensor MUX.

mdsmitty
Novice
Posts: 78
Joined: Tue Feb 27, 2007 3:07 am
Contact:

Postby mdsmitty » Tue Jan 22, 2008 12:32 am

I was entering 2 in to setAddress which bumped it to 3 which is why the sensor would not work.Your right it does need a little explaining.Is there a reason that the address needs to be increased its misleading.


Return to “NXJ Hardware”

Who is online

Users browsing this forum: No registered users and 2 guests