Im trying to send two analog values through an xbee. so far I've tryed to use a sync character like this:
The transmitter prints the value 255 then x value BYTE then value 254 then y value BYTE.
so for the reciever i did this:
incomingByte = Serial.read();
if (incomingByte == 255){
x = Serial.read();
}
if (incomingByte == 254){
y = Serial.read();
}
Thank you in advance.