I would like some help in overcoming a task. I want to send two identical int (16bits) variables with a qualifier byte (for example 'S' as a start byte then two identical int (16bits)). On the other side one arduino will look for an 'S' and then read two ints. Then compare the two received ints, if they are the same then clear the receiver buffer and do further processing.
Can someone please help me with some pointers as to how to start dealing with this. I came up with some transmit code, not sure if it is up to scratch.
char qual='S';
int firstWord=0B0000000011001100
int secondWord=0B0000000011001100
void setup(){
Serial.begin(57600);
}
void loop(){
Serial.print(qual);
Serial.print(firstWord);
Serial.print(secondWord);
delay (50);
}