LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

I2C Read not giving correct values

Hi Folks,

I’m trying to get my I2C interface working between an Uno board and my design.  I can write to the registers of the IC’s and everything works fine but I can’t read from them correctly.  Below is a screenshot of my VI, its reading back a byte of data but the data is not what I expect and doesn’t change when I change the register address…  Can anyone see where I’m going wrong?  Hope you can help!

Pat

I2C Read Problem.JPG

0 Kudos
Message 1 of 3
(4,043 Views)

Hi Pat,

Are you sure you're writing the register address correctly? Instead of the array manipulation why not simply use the 'constant' option for the "I2C Data Bytes" terminal and write the address as 0x12 ?

-CC

----------------------------------------------------------------------------------------------------------------------------
"If anyone needs me, I'll be in the Angry Dome!"


0 Kudos
Message 2 of 3
(2,788 Views)

Hey ptunn,

Are you using Arduino 1.0 or one of the earlier versions? There were some changes in how this library is set up with Arduino 1.0.  I would suspect either an issue with addressing the register or the device.  What I2C device are you using?

Kevin Fort
Principal Software Engineer
NI
0 Kudos
Message 3 of 3
(2,788 Views)