2 mindsensors DistNx using a mindsensors port splitter

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

Moderators: 99jonathan, roger, imaqine

2 mindsensors DistNx using a mindsensors port splitter

Postby burti » Mon Jul 27, 2009 2:19 am

HI. It's me again.
I tried hard to get 2 mindsensors distnx running using a mindsensors port splitter - without success.
I used the reference implementation OpticalDistanceSensor.java by mindsencors.com (http://www.mindsensors.com/index.php?module=documents&JAS_DocumentManager_op=viewDocument&JAS_Document_id=65).

If you use a dist-nx sensor on one port it works fine.
But I haven't found a solution to use 2 dist-nx using a port splitter.
Calling "setAPDAOn();" to switch APDA seems to change nothing.
What does it do at all? DOes it change any address ? If so, then I haven't noticed it. Dead end !

Changing the address with code like this neither works:
Code: Select all
      
byte[] newAddress = {(byte) 0xA0, (byte) 0xAA, (byte) 0xA5, (byte) 0x08};
      OptDistSensorSR optDistSen = new OptDistSensorSR(SensorPort.S1);
      optDistSen.sendData(0x41, newAddress, 4);
      optDistSen.setAddress(0x04);

OptDistSensorSR is my name for the OpticalDistanceSensor class by mindsensors.
Other adresses like 0x04 neither work.
It seems to me that sendData(..) doesn't work in this case at all!
Why? You can always read wrong values from the sensors which are the result of interference between those.

I read several threads but it didn't help me:
http://lejos.sourceforge.net/forum/viewtopic.php?t=688
http://lejos.sourceforge.net/forum/viewtopic.php?t=489
http://lejos.sourceforge.net/forum/viewtopic.php?t=742
http://lejos.sourceforge.net/forum/viewtopic.php?t=813

Of course I noticed there is/was a mistake in the setaddress-method.
So I added the modified setaddress-method by gloomyandy to OptDistSensorSR and used it:

Code: Select all
public int sendData(int address, int register, byte [] buf, int len) {
           // AS Fix to allow write to work correctly. Avoid using the
           // automatic internal address. Instead send the address as
           // part of the data
           if (len >= 5) return -1;
           byte[] byteBuff = new byte[len+1];
         for(int i=0; i < len; i++ )
               byteBuff[i+1] = buf[i];
           byteBuff[0] = (byte)register;
           int ret = getPort().i2cStart(address, 0, 0, byteBuff, len+1, 1);
        
           if (ret != 0) return ret;
        
           while (getPort().i2cBusy() != 0) {
               Thread.yield();
           }
        
           return 0;
       }


Code: Select all
      byte[] newAddress = {(byte) 0xA0, (byte) 0xAA, (byte) 0xA5, (byte) 0x08};   
      OptDistSensorSR optDistSen = new OptDistSensorSR(SensorPort.S1);
      optDistSen.sendData(0x01,0x41, newAddress, 4);
      optDistSen.setAddress(0x04);

Once again: Doesn't work. Besides I tried several combinations without success. I'm desperating.
Have you advice for me please?
It must work anyway but I don't know how ....

Thank you in advance,
burti
burti
Novice
 
Posts: 61
Joined: Thu Jun 25, 2009 11:41 pm

Postby gloomyandy » Mon Jul 27, 2009 12:59 pm

Hi,
I assume this also relates to your other i2c post. Ok so to be able to use 2 (or more) sensors on the same port you have to do a couple of things...
1. Make sure the two sensors have different addresses.
2. Sort out any issues with pull up resistors.

The first stage is changing the address and getting it to work with the new address. Obviously you should only plug in a single device when doing this. First off make sure you have 0.8 installed don't mess around trying to use any of my previous code it should not be needed. The sample RobotC code to change the address does so by sending each byte as a separate byte so you should try this rather than writing them all in one go. So basically you need to do...
port.sendData(0x41, 0xa0);
port.sendData(0x41, 0xaa);
port.sendData(0x41, 0xa5);
port.sendData(0x41, newAddress);

after that you may be able to use the new address (note that you may have to divide the address by 2 due to the rather odd addressing of i2c. So if you set the address to 4 you should probably try using 2, 4 and 8 to see if any of them work.

The above may work but it may not. The problem that you may run into is the leJOS i2c driver (like the Lego one) releases the i2c bus between commands and I have a feeling that this may mess up the change address sequence. If it does then you have a couple of choices. The easy option is just to grab an eval copy of RobotC and use it to run the ser address code from the mindsensors site, once you have changed the address you should be able to use it with leJOS fine... The second option would be to help me try and get this working with leJOS, but that will require you to install a dev snapshot version and may take a while because I'm pretty busy just now...

Once you have the new address set then you need to sort out the pull up resistors on the mindsensor devices I'm pretty sure that is what using the setADPDAOn() does, this will have no impact on a single sensor setup but is essential when using more then one...

Good luck

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

Postby burti » Mon Jul 27, 2009 5:07 pm

Thank you for your post.

gloomyandy wrote:The above may work but it may not. The problem that you may run into is the leJOS i2c driver (like the Lego one) releases the i2c bus between commands and I have a feeling that this may mess up the change address sequence.

It doesn't unfortunately work though.
I have the same feeling:

DIST-Nx V1.2User Guide/I2C Bus address by mindsensors.com wrote:The I2C bus address of DIST-Nx can be changed. To set an address
different from default address, send sequence of following
commands on the command register:
0xA0, 0xAA, 0xA5, <new I2C address>
Note: Send these commands with no break/read operation in
between.
This new address is effective immediately. Please note
down your address carefully for future reference.

What I haven't noticed on this remark first:
If you succeed in changing the i2c address of a sensor once, then the i2c sensor still KEEPS this address after program termination as well. You don't have to repeat the changing of the i2c address every time you start your program.
Am I right?

gloomyandy wrote:If it does then you have a couple of choices. The easy option is just to grab an eval copy of RobotC and use it to run the ser address code from the mindsensors site, once you have changed the address you should be able to use it with leJOS fine...

Thank you for your advice. I'll try this out. Hope arises again ;-)

Burti
burti
Novice
 
Posts: 61
Joined: Thu Jun 25, 2009 11:41 pm

Postby burti » Mon Aug 10, 2009 10:14 pm

first: sorry for the double post ;-)

gloomyandy wrote:If it does then you have a couple of choices. The easy option is just to grab an eval copy of RobotC and use it to run the ser address code from the mindsensors site, once you have changed the address you should be able to use it with leJOS fine...

To cut a long story short, I tried it out without success.

In fact you can't even change the i2c address of an dist-nx sensor in RobotC with the sample code on http://www.mindsensors.com/index.php?module=documents&JAS_DocumentManager_op=viewDocument&JAS_Document_id=18.
I posted a thread in the RobotC forum to ask them whether I'm right or wrong.

I'll write an email to mindsensors to ask them.
burti
Novice
 
Posts: 61
Joined: Thu Jun 25, 2009 11:41 pm

Postby gloomyandy » Tue Aug 11, 2009 11:11 am

Hi,
Thanks for the update. I've now added the capability to not release the i2c bus during a set of transactions to leJOS (in the current developers snapshot). But it is probably not worth trying this until you have established how to change the address etc. using the RobotC code... Let us know how you get on...

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

Postby burti » Sat Aug 15, 2009 5:22 pm

GOOD NEWS: IT WORKS NOW !

Running 2 DistNX-Sensors over a port splitter - how you achieve it:

What you need:
2 Dist-Nx
3 cables
1 portsplitter
1 nxtbrick
your lego mindstorms nxt software cd-rom
(i.e. Mindstorms NXT 1.0/1.1 Kit - ensure that your NXT firmware version is 1.05)
changeaddr.rxe (http://www.mindsensors.com/index.php?module=documents&JAS_DocumentManager_op=viewDocument&JAS_Document_id=91)
Java Lejos 0.8 (http://sourceforge.net/projects/lejos/files/lejos-NXJ-win32/)
Following source code:
OptDistSensorSR.java
Code: Select all
import lejos.nxt.*;
/**
 * Supports Mindsensors DIST-Nx series of Optical Distance Sensor.<br>
 * This sensor is used for greater precision than the Ultrasonic Sensor.<br>
 *
 * @author Michael Smith <mdsmitty@gmail.com>
 * <br><br>Lum, Many thanks for helping me test this class.
 */

public class OptDistSensorSR extends I2CSensor{
   private byte[] buf = new byte[2];
   //Registers
   private final static int COMMAND = 0x41;
   private final static int DIST_DATA_LSB = 0x42;
   private final static int DIST_DATA_MSB = 0x43;
   private final static int VOLT_DATA_LSB = 0x44;
   private final static int VOLT_DATA_MSB = 0x45;
   private final static int SENSOR_MOD_TYPE = 0x50;
   private final static int CURVE = 0x51;
   private final static int DIST_MIN_DATA_LSB = 0x52;
   private final static int DIST_MIN_DATA_MSB = 0x53;
   private final static int DIST_MAX_DATA_LSB = 0x54;
   private final static int DIST_MAX_DATA_MSB = 0x55;
   private final static int VOLT_DATA_POINT_LSB = 0x52;
   private final static int VOLT_DATA_POINT_MSB = 0x53;
   private final static int DIST_DATA_POINT_LSB = 0x54;
   private final static int DIST_DATA_POINT_MSB = 0x55;
   
   //Sensor Modules
   public final static byte GP2D12 = 0x31;
   
   /**
    * DIST-Nx-Short
    */
   public final static byte GP2D120 = 0x32;
   
   /**
    * DIST-Nx-Medium
    */
   public final static byte GP2YA21 = 0x33;
   
   /**
    * DIST-Nx-Long
    */
   public final static byte GP2YA02 = 0x34;
   
   /**
    * Custom sensor
    */
   public final static byte CUSTOM = 0x35;
   
   //Commands
   private final static byte DE_ENERGIZED = 0x44;
   private final static byte ENERGIZED = 0x45;
   private final static byte ARPA_ON = 0x4E;
   private final static byte ARPA_OFF = 0x4F; //(default)
   
   /**
    *
    * @param port NXT sensor port 1-4
    */
   public OptDistSensorSR(I2CPort port){
      super(port);
      powerOn();
   }
   
   /**
    * This only needs the be run if you are changing the sensor.
    * @param module changes the sensor module attached the he board.
    *
    */
   public void setSensorModule(byte module){
      sendData(COMMAND, module);
   }
   
   /**
    * Returns the distance from the object in millimeters.
    * This returns the same value as getDistLSB.
    * @return int
    */
   public int getDistance(){
      return getDistLSB();
   }
   
   /**
    * Turns the sensor module on.  <br>
    * Power is turned on by the constuctor method.
    *
    */
   public void powerOn(){
      sendData(COMMAND, ENERGIZED);
   }
   
   /**
    * Turns power to the sensor module off.
    *
    */
   public void powerOff(){
      sendData(COMMAND, DE_ENERGIZED);
   }
   
   /**
    * Enables (ADPA) Auto Detecting Parallel Architecture. <br>
    * Once you have enabled it you dont have to enable again.
    *
    */
   public void setAPDAOn() {
      sendData(COMMAND, ARPA_ON);
   }
   
   /**
    * Disables (ADPA) Auto Detecting Parallel Architecture.<br>
    * Disabled by default.
    *
    */
   public void setAPDAOff() {
      sendData(COMMAND, ARPA_OFF);
   }
   
   /**
    * Returns the current distance in millimeters for the LSB.
    * @return int
    */
   public int getDistLSB(){
      return readDISTNX(DIST_DATA_LSB, 2);
   }
   
   /**
    * Returns the current distance in millimeters for MSB.
    * @return int
    */
   public int getDistMSB(){
      return readDISTNX(DIST_DATA_MSB, 2);
   }
   
   /**
    * Returns the current voltage level in millivolts for the LSB.
    * @return int
    */
   public int getVoltLSB(){
      return readDISTNX(VOLT_DATA_LSB, 2);
   }
   
   /**
    * Returns the current voltage level in millivolts for the MSB.
    * @return int
    */
   public int getVoltMSB(){
      return readDISTNX(VOLT_DATA_MSB, 2);
   }
   
   /**
    * Used to determin the sensore module that is configured.
    * This can be helpful if the sensor is not working properly.
    * @return int
    */
   public int getSensorModule(){
      return readDISTNX(SENSOR_MOD_TYPE, 1);
   }
   
   /**
    * Gets the number of points that will be in the curve.
    *  This corisponds with the set/get Volt and Distance methods.<br>
    * Used for recalibrating the sensor.
    * @return int
    */
   public int getCurveCount(){
      return readDISTNX(CURVE, 1);
   }
   
   /**
    * Sets the number of points that will be in the configured curve.
    * This corisponds with the set/get Vold and Distance points methods.<br>
    * Used for recalibrating the sensor.
    * @param value max 39
    */
   public void setCurveCount(int value){
      sendData(CURVE, (byte)value);
   }   
   
   /**
    * Gets the min value in millimeters for the LSB.<br>
    * Used for recalibrating the sensor.
    * @return int
    */
   public int getDistMinLSB(){
      return readDISTNX(DIST_MIN_DATA_LSB, 2);
   }
   
   /**
    * Sets the min value in millimeters for the LSB.<br>
    * Used for recalibrating the sensor.
    * @param value int
    */
   public void setDistMinLSB(int value){
      writeDISTNX(DIST_MIN_DATA_LSB, (byte)value);
   }
   
   /**
    * Gets the min value in millimeters for the MSB.<br>
    * Used for recalibrating the sensor.
    * @return int
    */
   public int getDistMinMSB(){
      return readDISTNX(DIST_MIN_DATA_MSB, 2);
   }
   
   /**
    * Sets the min value in millimeters for the MSB.<br>
    * Used for recalibrating the sensor.
    * @param value int
    */
   public void setDistMinMSB(int value){
      writeDISTNX(DIST_MIN_DATA_MSB, (byte)value);
   }
   
   /**
    * Gets the max value in millimeters for the LSB.<br>
    * Used for recalibrating the sensor.
    * @return int
    */
   public int getDistMaxLSB(){
      return readDISTNX(DIST_MAX_DATA_LSB, 2);
   }
   
   /**
    * Sets the max value in millimeters for LSB.<br>
    * Used for recalibrating the sensor.
    * @param value int
    */
   public void setDistMaxLSB(int value){
      writeDISTNX(DIST_MAX_DATA_LSB, (byte)value);
   }
   
   /**
    * Gets the max value in millimeters for the MSB.<br>
    * Used for recalibrating the sensor.
    * @return int
    */   
   public int getDistMaxMSB(){
      return readDISTNX(DIST_MAX_DATA_MSB, 2);
   }
   
   /**
    * Sets the max value in millimeters for the MSB.<br>
    * Used for recalibrating the sensor.
    * @param value int
    */
   public void setDistMaxMSB(int value){
      writeDISTNX(DIST_MAX_DATA_MSB, (byte)value);
   }
   
   /**
    * Gets millivolts value of the specific index for the LSB.
    * These will corispond with the point methods index value.<br>
    * Used for recalibrating the sensor.
    * @param index max 39
    * @return int
    */
   public int getVoltPointLSB(int index){
      if(index == 0) index = 1;
      index = VOLT_DATA_POINT_LSB + 4 * index;
      return readDISTNX(index, 2);
   }
   
   /**
    * Sets millivolts value of the specific index for the LSB.
    * These will corispond with the point methods index value.<br>
    * Used for recalibrating the sensor.
    * @param index max 39
    * @param value int
    */
   public void setVoltPointLSB(int index, int value){
      if(index == 0) index = 1;
      index = VOLT_DATA_POINT_LSB + 4 * index;
      sendData(index, (byte)value);
   }
   
   /**
    * Gets millivolts value of the specific index for the MSB.
    *  These will corispond with the point methods index value.<br>
    * Used for recalibrating the sensor.
    * @param index max 39
    * @return Returns int
    */
   public int getVoltPointMSB(int index){
      if(index == 0) index = 1;
      index = VOLT_DATA_POINT_MSB + 4 * index;
      return readDISTNX(index, 2);
   }
   
   /**
    * Sets millivolts value of the specific index for the MSB.
    * These will corispond with the point methods index value.<br>
    * Used for recalibrating the sensor.
    * @param index max 39
    * @param value int
    */
   public void setVoltPointMSB(int index, int value){
      if(index == 0) index = 1;
      index = VOLT_DATA_POINT_MSB + 4 * index;
      writeDISTNX(index, value);
   }
   
   /**
    * Gets millimeter value of the specific index for the LSB.<br>
    * Used for recalibrating the sensor.
    * @param index max 39
    * @return Returns int
    */
   public int getDistPointLSB(int index){
      if(index == 0) index = 1;
      index = DIST_DATA_POINT_LSB + 4 * index;
      return readDISTNX(index, 2);
   }
   
   /**
    * Sets millimeter value of the specific index for the LSB. <br>
    * Used for recalibrating the sensor.
    * @param index max 39
    * @param value int
    */
   public void setDistPointLSB(int index, int value){
      if(index == 0) index = 1;
      index = DIST_DATA_POINT_LSB + 4 * index;
      writeDISTNX(index, value);
   }
   
   /**
    * Gets millimeter value of the specific index for the MSB. <br>
    * Used for recalibrating the sensor.
    * @param index max 39
    * @return int
    */
   public int getDistPointMSB(int index){
      if(index == 0) index = 1;
      index = DIST_DATA_POINT_MSB + 4 * index;
      return readDISTNX(index, 2);
   }
   
   /**
    * Sets millimeter value of the specific index for the MSB. <br>
    * Used for recalibrating the sensor.
    * @param index max 39.
    * @param value int
    */
   public void setDistPointMSB(int index, int value){
      if(index == 0) index = 1;
      index = DIST_DATA_POINT_MSB + 4 * index;
      writeDISTNX(index, value);
   }
   
   /**
    * Returns an integer value from the specified register.<br>
    * @param register I2C register, e.g 0x41
    * @param bytes number of bytes to read 1 or 2
    * @return int value from register
    */
   private int readDISTNX(int register, int bytes){
      int buf0;
      int buf1;
      
      getData(register, buf, bytes);
      
      if (bytes == 1)   return buf[0] & 0xFF;
      
      buf0 = buf[0] & 0xFF;
      buf1 = buf[1] & 0xFF;
      return buf1 * 256 + buf0;
   }
   
   /**
    * Writes an integer value to the register. <br>
    * This is called if two bytes are to be writen.<br>
    * All other methods just call sendData() from i2cSensor.
    * @param register I2C register, e.g 0x41
    * @param value iteger value to be writen to the register
    */
   private void writeDISTNX(int register, int value){      
      int buf0;
      int buf1;
      
      buf0 = value % 256;
      buf1 = value / 256;
      buf[0] = (byte)buf0;
      buf[1] = (byte)buf1;
      
      sendData(register, buf, 2);   
   }

}

PortSplitterNxt.java
Code: Select all
import lejos.nxt.Button;
import lejos.nxt.LCD;
import lejos.nxt.SensorPort;

public class PortSplitterNxt {

   private static final String LABEL_OPT_DIST_SEN_SR = "DistL=";
   private static final String LABEL_OPT_DIST_SEN_SR_2 = "DistR=";

   public static void main(String[] args) throws InterruptedException {

      OptDistSensorSR optDistSen = new OptDistSensorSR(SensorPort.S1);

      optDistSen.setAPDAOn(); // switch off pull-up resistors
      optDistSen.setAddress(0x02); // use (realaddress / 2) as new address

      optDistSen.setSensorModule(OptDistSensorSR.GP2D120); // force recalibration
      
      OptDistSensorSR optDistSen2 = new OptDistSensorSR(SensorPort.S1);
      optDistSen2.setAPDAOn(); // switch off pull-up resistors
      optDistSen2.setAddress(0x04); // use (realaddress / 2) as new address

      optDistSen2.setSensorModule(OptDistSensorSR.GP2D120);// force recalibration
      optDistSen2.powerOff(); // force restart
      optDistSen2.powerOn();
      optDistSen.powerOff(); // force restart
      optDistSen.powerOn();

      while (!Button.ESCAPE.isPressed()) {
         int x = 0;
         int y = 0;
         LCD.drawString(LABEL_OPT_DIST_SEN_SR, x, y);
         x += LABEL_OPT_DIST_SEN_SR.length();
         LCD.drawInt(optDistSen.getDistLSB(), 3, x, y);
         x += 3;
         LCD.drawString(" mm", x, y);

         x = 0;
         y++;
         LCD.drawString(LABEL_OPT_DIST_SEN_SR_2, x, y);
         x += LABEL_OPT_DIST_SEN_SR_2.length();
          LCD.drawInt(optDistSen2.getDistance(), 3, x , y);
         x += 3;
         LCD.drawString(" mm", x, y);

         LCD.refresh();
         try {
            Thread.sleep(100);
         } catch (InterruptedException e) {
            // TODO Auto-generated catch block

         }
      }

   }
}

To put it short, what has to be done:
First you have to exchange the i2c address of each distnx-sensor by using changeaddr.rxe on standard NXT firmware version 1.05 by Lego Mindstorms Nxt. Download it from http://www.mindsensors.com/index.php?module=documents&JAS_DocumentManager_op=viewDocument&JAS_Document_id=91)
and upload it (http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=105). Start the program and use it.
Sometimes the change of address is successful, sometimes not. The program shows you the current address. So you can check
I recommend to give the one sensor the new address 0x04 and the other one 0x08. After that you can put Lejos on your Nxt again and just run the program PortsplitterNxt (=> PortsplitterNxt.java).
It should work. If not, tell me.

Burti
burti
Novice
 
Posts: 61
Joined: Thu Jun 25, 2009 11:41 pm

Postby ChrisB01 » Thu Aug 20, 2009 8:11 am

gloomyandy wrote:I've now added the capability to not release the i2c bus during a set of transactions to leJOS (in the current developers snapshot).


I would like to try using this to run a lego ultrasonic sensor with a mindsensors accelerometer on a mindsensors port splitter. How do you go about changing the address of the sensor (accelerometer)?

Thanks,

Chris
ChrisB01
Advanced Member
 
Posts: 189
Joined: Sat Mar 15, 2008 12:19 pm
Location: UK

Postby gloomyandy » Thu Aug 20, 2009 3:10 pm

Hi Chris,
I'm not sure what to recommend at the moment. As you can see from this thread, another user has been struggling to get this to work. It would seem that they have been unable to make the change address command "stick". All I can suggest is that you use the mechanisms provided on the Mindsensors web site to change he address and then see if you can access the device at the new address. When doing this remember that leJOS uses the i2c standard address range notation of 1-0x7f rather then the 2-0xff notation so you may have to divide the address you set by 2 when using leJOS (so if you set the address to be say 4 using another - no leJOS - system you may have to use address 2 to access it from leJOS). So for instance the standard address for Lego sensors in Lego terms is 2 in i2c/leJOS terms that is address 1...

Good luck, let us know how you get on...

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

Re: 2 mindsensors DistNx using a mindsensors port splitter

Postby nxtfan » Sat Jul 07, 2012 1:24 pm

Hi,

I tried to change the i2c address of my ultrasonic sensors using those two rxe files provided by Mindsensor, however I had no success in changing the i2c address. Does someone know why? Thanks.

Best,
Dennis
nxtfan
New User
 
Posts: 11
Joined: Sat Jun 09, 2012 10:36 am

Re: 2 mindsensors DistNx using a mindsensors port splitter

Postby skoehler » Sat Jul 07, 2012 9:42 pm

The Lego ultrasonic sensor does not allow changing its I2C address. Also, mindsensors doesn't seem to offer an ultrasonic sensor. What is an RXE file?
Do you think that changing some sensors I2C address is a feature that every sensor supports? That is not the case.
skoehler
leJOS Team Member
 
Posts: 1418
Joined: Thu Oct 30, 2008 4:54 pm

Re: 2 mindsensors DistNx using a mindsensors port splitter

Postby nxtfan » Mon Jul 09, 2012 8:33 pm

I downloaded the two files for detecting and changing I2C address on:
http://www.mindsensors.com/index.php?module=documents&JAS_DocumentManager_op=viewDocument&JAS_Document_id=91
I also got a reply from Mindsensor support they say I cannot change i2c address of ultrasonic sensors...
Thanks anyway!
nxtfan
New User
 
Posts: 11
Joined: Sat Jun 09, 2012 10:36 am

Re: 2 mindsensors DistNx using a mindsensors port splitter

Postby nxtfan » Tue Jul 10, 2012 8:57 pm

skoehler wrote:The Lego ultrasonic sensor does not allow changing its I2C address. Also, mindsensors doesn't seem to offer an ultrasonic sensor. What is an RXE file?
Do you think that changing some sensors I2C address is a feature that every sensor supports? That is not the case.


Ok... I went through the following post and thought it's possible to change the i2c address of ultrasonic sensors and connect them to the port splitter. Is it not the case?
viewtopic.php?f=7&t=966
nxtfan
New User
 
Posts: 11
Joined: Sat Jun 09, 2012 10:36 am

Re: 2 mindsensors DistNx using a mindsensors port splitter

Postby skoehler » Wed Jul 11, 2012 6:48 am

nxtfan wrote:
skoehler wrote:The Lego ultrasonic sensor does not allow changing its I2C address. Also, mindsensors doesn't seem to offer an ultrasonic sensor. What is an RXE file?
Do you think that changing some sensors I2C address is a feature that every sensor supports? That is not the case.


Ok... I went through the following post and thought it's possible to change the i2c address of ultrasonic sensors and connect them to the port splitter. Is it not the case?
viewtopic.php?f=7&t=966

The Lego Ultrasonic does not support changing the I2C address. The mindsensors accelerometer does support this.
skoehler
leJOS Team Member
 
Posts: 1418
Joined: Thu Oct 30, 2008 4:54 pm


Return to NXJ Software

Who is online

Users browsing this forum: No registered users and 3 guests

more stuff