LabVIEW Interface for Arduino Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Connecting Two Arduino via SPI

Is it possible to communicate two Arduino via SPI Labveiw? I'm trying to communicate two Arduinos via the SPI library, but do not know how to communicate.

0 Kudos
Message 1 of 6
(6,379 Views)

LIFA does not use SPI to communicate between the Arduino and LabVIEW.  So, you will have to be more specific about your application to be able to provide a good answer to your question.

0 Kudos
Message 2 of 6
(3,986 Views)

Ok, Nathan, sorry for making a short question. I do not want to use the SPI port to communicate with Arduino LabVIEW. I use two Arduino, one as Master and one as Slave communicated by SPI, and use LabVIEW to communicate with each of the Arduino via the USB port.photo2.jpg

0 Kudos
Message 3 of 6
(3,986 Views)

An alternate approach is to use I2C for communication between two Arduinos.  The book " Internet of Things with the Arduino Yun" provides an example for sending commands from an Arduino Yun to an Arduino Uno using I2C.  This is an excellent book if you are interested in remote Energy Monitoring, a Cloud connected Camera or a WiFi controlled Mobile Robot. A kindle edition is available for $10.00 from Amazon.

One word of caution the Author forgot to mention the need for pull up resistors with I2C.

hrh1818

0 Kudos
Message 4 of 6
(3,986 Views)

hrh1818, thank you very much. But I wanted to use SPI instead of I2C. I think to make the communication, it is necessary to modify the Arduino code.

0 Kudos
Message 5 of 6
(3,986 Views)

You can use LIFA on the one connected directly to LabVIEW without modification.  You will, however, need to make entirely custom code for the Arduino that will be the SPI slave device.

0 Kudos
Message 6 of 6
(3,986 Views)