Interface Labview and arduino

Status
Not open for further replies.

trojan89

New Member
I need some help on interfacing arduino and labview, particularly sending information from labview to arduino. I have been successful in sending information from arduino to labview.

Arduino program
void setup(){
Serial.flush();
Serial.begin(9600);
pinMode(12, OUTPUT);
pinMode(13, OUTPUT);
}
void loop(){
int data;
int i;
data = Serial.read();
if (Serial.available() == 0){
if(Serial.read() == 1)
{
digitalWrite(12, HIGH);
digitalWrite(13, LOW);
}
else
{
digitalWrite(13,HIGH);
digitalWrite(12, LOW);
}
}
delay(10000);
Serial.end();
}


Any help appreciated.
 

Attachments

  • Untitled.png
    295.4 KB · Views: 591
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…