View Full Version : Using I2C to communicate with arduino in LabVIEW.
RoboNerd01
28-01-2014, 23:26
I have been trying to use the WPI I2C library to communicate with my arduino mega 2560 for a LCD display for a while now... But the problem is that LabVIEW tries to verify that the "sensor" is there and wont send ANYTHING to it until it receives a response from the "sensor". Has anyone ever used I2C for anything close to this, or at all? Or is there a better and easier way to do communications? I searched everywhere but could not find ANYTHING on this.
And I'm curious if it is legal to use an Ethernet shield of our robot.
Thanks.
Two things to consider. Are you using a 7 bit or 8 bit address and do you have the arduino board set up as a slave?
If you have an oscilloscope that would help too.
jman4747
29-01-2014, 10:08
I've tried...
http://www.chiefdelphi.com/forums/showthread.php?t=120173 You could try post #4 from this thread.
Best bet is to use the serial port, it has proven to be better for me. I suspect this is because I2C is so heavily geared towards reading sensors while the serial VI's were made more for general 2 way communication use. I would look into sending things in strings to the arduino storing them then sending them to the display from the arduino.
An Ethernet shield would work as well for communications. But I am interested in seeing what you find out on I2C as well. We were looking at possibly using this as well as a communications method.
Randy
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.