04-07-2013 05:49 AM
Is there any one who succeed connecting Arduino & LabVIEW with Bluetooth?
I have followed the document listed in http://digital.ni.com/public.nsf/allkb/D86D6E2927F9C37A8625788E0077E86B?OpenDocument ,and succeeded with the serial monitor,a bluetooth connection, and a simplle sketch on arduino as follows:
void setup()
{
Serial.begin(115200);
}
void loop()
{
Serial.println("Hello World!");
delay(1000);
}
But, when I tried to use LIFA Firmware and LabVIEW, there is an Error -1073807360 occurred. It seems that the problem is the VISA CLR function in Init.vi. When I delete the VI, another Error 5003 occurred.
Can anyone help me?
Thanks!
04-07-2013 06:10 AM
void setup()
{
Serial.begin(115200);
}
void loop()
{
Serial.println("Hello World!");
delay(1000);
}
It works using bluetooth connection with the sketch and block diagram above.
But It doesn't work with the LIFA firmware and the block diagram below. I don't know why.
04-08-2013 12:58 AM
Hi, can anyone please help me out?
04-08-2013 02:48 PM
Can you confirm that the VISA Clear function generates the error? Try temporarily removeing that VI from the Init VI to see if that resolves the problem (it shouldn't be necissary and is there 'just in case').
Let us know if that helps.
-Sam K
04-08-2013 09:02 PM
Sam K,
Thanks for your suggestion. I did do that. When the VISA Clear function removed from the Init VI , the VISA configure Seria Port VI works , but there is another error occered as shown in the picture below.
I've tried a simple VI testing the communication between Arduion & LabVIEW. It works with USB cable but not with Bluetooth. I'm sure that the bluetooth model can connect with LabVIEW because the following test woks with bluetooth.
VI:
the sketch on arduino:
void setup()
{
Serial.begin(115200);
}
void loop()
{
Serial.println("Hello World!");
delay(1000);
}
04-12-2013 10:48 PM
Hi, Sam K,
I have made some modifications to the Init.vi function with the tips of the document http://digital.ni.com/public.nsf/allkb/67C56BFD27FD0BA8862578A2002CC10E
and finally it woks with the bluetooth.
VISA CLEAR VI deleted and Set I/O Buffer Size VI added with the "mask" parameter "I/O Receive and Transmit Buffer".
It seems that all the thing goes right but I don't konw why. Is it a bug of LIFA?
Lesta
04-12-2013 11:56 PM
Hey, if they can get across Labview through serial port via USB cable can also communicate mediente Bluetooth, a detail would check the COM port assigned to the Bluetooth is not always the same as that assigned to the arduino, the following code works and it worked without problems https://decibel.ni.com/content/thread/16912?tstart=0
04-13-2013 08:19 AM
Thank you Tom,
If the serial port via USB cable works , the serial port via Bluetooth should work too. But it doesn't actually. I'm sure I make the right COM.
However, it finally works as I have mentioned above, though I don't know why.