Hi Everyone,
I am trying to get arduino to receive a message from labview and then run a function within arduino from this message. I am using the serial event architecture. Arduino function beginFunction() successfully sends a message to labview, but labview does not seem to send a message back. My arduino code is as follows:
void loop()
{
if(start==true)
{
beginFunction();
}
if(inputString.equals("move"))
{
moveUntilPos();
}
if(inputString.equals("scan"))
{
scan();
}
}
void serialEvent()
{
while (Serial.available())
{
char inChar = (char)Serial.read();
if (inChar != '\n') {
inputString += inChar;
}
if (inChar == '\n') {
stringComplete = true;
}
}
}
my labview file is attached.
It does not seem to register the message in arduino, does anyone know why?
Thanks,
Sam.