Jump to content
  • 0

Question about Using NXT Sensor Adapter for NI myRIO to obtain i2C sensor value


Kody

Question

Hi,

We just bought the NXT Sensor Adapter for NI myRIO cause we were looking for some sort of i2C sensor multiplexer as the i2C port on myrio are very limited. 

We tried putting NXT touch sensor and NXT light sensor and used the I/O monitor to read on the analog option(Below picture). It works fine.

1561281534_WhatsAppImage2018-08-25at5_02_53PM.thumb.jpeg.8976ec32dc70844baf41fa58f1f89a5c.jpeg

 

But when we tried reading the HiTechnic compass sensor/ other i2C sensors (Core color sensor SKU:45-2018) on the  I/O monitor, we cannot read the value. It shows invalid slave address. We did try connecting the sensor on the legacy port or the 6 pin headers on top but both could not work. 
1966665626_WhatsAppImage2018-08-25at5_21_21PM(1).thumb.jpeg.46382e0c90915a9ec26f410a09a508ec.jpeg


However when we read the sensor value with the pin plugging to the MXP pin directly, we could obtain the value. So we suspect that the problem is regarding the use of the Digilent NXT Sensor Adapter. Anyone have similar experience and know what should we do? Or anyone could provide the example code for reading the sensor values with the Digilent NXT Sensor Adapter using labview?Many thanks!

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Hi @Kody,

Those of us here at Digilent haven't worked a lot with the NXT Sensor Adapter (Digilent just made the hardware and did very little work on the software side of things), so we will be of limited help in that regard.

However, I did learn that the NXT Sensor Adapter does have a mux built into it where you select which output you are using because the Lego Mindstorms NXT sensor adapters were all hard-coded with their I2C addresses, so the only way to support multiple of the same sensor was to switch which one you were talking to with the mux. With this in mind, there is a possibility that you do not have the correct port selected in your setup that is associated with with the one you are using. Beyond that though, the board has only been tested and designed to support passive and digital Lego certified sensors, so know that no additional work or testing has been done with other 3rd party sensors. I would also recommend to ensure that you have the correct I2C address provided in your VI as well.

Let me know if you have any questions about this.

Thank you,
JColvin

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...