I am a bit confused on the pipe variable - Should I declare it reffering to the slave address?
How is it going to to be used?
Very strange after your claim here:
Yes I clearly do understand this code..
You use the pipe variable to find/use the correct processing of packets, selected by the address/pipe.
So you don't have to make any assumptions about the order of packets, you just process them as they come.
You could add code that checks for new values (different from the last) coming in,
or code that sets flags that signal a reception.
if (radio.available(&pipe)) {
switch (pipe) {
case 1:
radio.read(&temp1, sizeof(temp1));
Serial.print(F("temp1 is "));
Serial.println(temp1);
break;
case 2:
radio.read(&temp2, sizeof(temp2));
Serial.print(F("temp2 is "));
Serial.println(temp2);
break;
default:
radio.read(&bitBucket, sizeof(bitBucket));
Serial.println(F("unexpected packet received"));
break;
}
}