I have already downloaded the arduino package for LabVIEW, MakerHub LINX, NI-Visa, and I've uploaded LIFA_Base to arduino, and it still does not work :(. My questions are:
1) Do I need to upload the LIFA_Base to arduino every time I want to interface arduino with LabVIEW, or is once enough? (the order I'm following is: upload LIFA_Base -> upload my arduino code -> run the LabVIEW code)
2) I know my arduino UNO is receiving info by the LabVIEW software because the RX led goes on every time I press the ON/OFF buttons, what could be the problem?
The ideia of this humble project is to turn on/off LED through the LabVIEW. The arduino code follows the LebVIEW code.
String c, string;
int led = 2;
void setup() {
Serial.begin(9600);
}
void loop() {
if (Serial.available() > 0) string = "";
while(Serial.available() > 0)
{
c = (byte)Serial.read();
if (c == ":")
{
break;
}else
{
string += c;
}
delay(1);
}
if (string == "LL")
{
digitalWrite(led, HIGH);
}
if (string == "DL")
{
digitalWrite(led, LOW);
}
}