LabVIEW for LEGO MINDSTORMS and LabVIEW for Education

cancel
Showing results for 
Search instead for 
Did you mean: 

Arduino and I2C using NXT

Can some one please help us ! !  

 

We are using a load cell sensor and reading the analog  signal via arduino uno board via am amplifier circuit. We can read the signal exactly in arduino(we tried using two boards ans making one mater read and other slave send, and everything works perfect) now we are trying to write that analog signal  as 1 byte on the I2C wires so that our lego mindstorm robot can read that 1 byte of data.

 

We used the I2C/NXT block from labview. We set the port address to be  66 (also tried 67) and  the read byte buffer as 1, the arduino built sensor is connected to port 1, on the lego brain, we are using galvanic isolators to connect between sda and sck on both devices since the power ratings are different, we are also using 82K pull up resistors, but we are unable to get any information in our labview program.

 

We have labview with the NXT tool kit, so we want to use the I2C block. we dont want to use any other programming language. We are trying to do something similar as shown in the link, http://www.adamfourney.com/news/using-the-arduino-uno-as-a-lego-mindstorms-nxt-sensor-with-galvanic-... but we have the load cell sensor and we want to read it as 1 or may be more bytes. I also refered to http://zone.ni.com/reference/en-XX/help/372962A-01/lvnxt/i2c_sensors/, but could not help much

 

Thank you

0 Kudos
Message 1 of 2
(6,692 Views)

For LEGO sensors, generally you want to send [0x2, 0x42] but your case might be different. Also make sure you are set to nxt port 1.

0 Kudos
Message 2 of 2
(6,686 Views)