since i wanted to compare the analog value, i did the comparison on the TX board, and sent a char over mySerial('f' for false or 't' for true) to the RX board, there on the RX i stored that char, then used switch\case to set a boolean flag for the 'if' statements..
it worked fine!
tx:
if(value<450)
{
mySerial.write('f');
}
if(value >900)
{
mySerial.write('t');
}
rx:
char RXdata; boolean flag=false;
void loop()
{
mySerial.listen();
if (mySerial.available()>0)
{
RXdata = mySerial.read();
switch(RXdata)
{
case 't':
flag=true;
break;
case 'f':
//flag = false;
break;
}
}
if(flag)
{// do something}
else{//do something else}
}