Pipe addresses are LSB, so if you use a char representation, only the first chars vary.
I like to stick those addresses in one array and select them by offsetting in the char array.
Only pipe 0 and pipe 1 have 5 bytes, pipe 2 to 6 are merely one byte extensions of pipe 1,
they get their "the first 4 bytes of the address matched"-signal from pipe 1.
Only five of the six pipe addresses (1 to 6) have to share the high part, so a good strategy is
to use compatible addresses and pipe 1 (and some of 2 to 6) for up to 5 pipes,
so you have pipe 0 free if you want to communicate to someone outside your address group.
Pipe 0 takes a group address too, but does not have to get one.
Pipe 0 is also used by the auto-ack process so the driver has to rewrite its address on each
startListening, because the hardware could have changed it.
So it is best left alone, until you really want to use 6 pipes at the same time.
const char adrs[] = "a_adr" "b_adr" "c_adr" "d_adr" "e_adr" "f_adr";
radio.openReadingPipe(1, adrs+3*5); // d_adr
Or you could create a function to create pipe addresses with a fixed prefix and use that.
radio.openReadingPipe(1, genAddr('d')); // d_adr
const char *genAddr(char sel) {
static char nadr[] = "?_adr";
nadr[0] = sel;
return (const char*)nadr;
}
Use a millis based timing.