Here's the code on the 1st pc:
int id1=0;
int id2=0;
int rsv=0;
int act[6];
int cr=1;
boolean test1=false;
boolean test2=false;
boolean test3=false;
void setup()
{
Serial.begin(9600);
Serial1.begin(9600);
}
void loop()
{
if (Serial.available()>0)
{
id1=Serial.read();
id2=Serial.read();
rsv=Serial.read();
if (id1=='A')
{
test1=true;
}
if (id2=='B')
{
test2=true;
}
if (rsv=='1')
{
test3=true;
}
//if (id1==true && id2==true && rsv==true)
//{
Serial1.println("worked");
id1, id2, rsv=false;
//}
}
}
Here's the code on the 2nd pc:
int c=1;
void setup() {
Serial.begin(9600);
Serial1.begin(9600);
}
void loop()
{
do
{
if (Serial1.available() > 0)
{
int inByte = Serial1.read();
Serial.println(inByte);
c++;
}
}while(c<100);
delay(600000);
}