FYI, I had to tweak two of the RF24 example programs
to get them to work correctly:
In "GettingStarted", the program defaults to "role_pong_back"
(receive and echo) mode, but the radio.openReadingPipe() is
set up for the "role_ping_out" mode.
To get the default role and pipe to match up you can change this:
//if ( role == role_ping_out )
{
//radio.openWritingPipe(pipes[0]);
radio.openReadingPipe(1,pipes[1]);
}
//else
{
//radio.openWritingPipe(pipes[1]);
//radio.openReadingPipe(1,pipes[0]);
}
to this:
//if ( role == role_ping_out )
{
//radio.openWritingPipe(pipes[0]);
// radio.openReadingPipe(1,pipes[1]);
}
//else
{
//radio.openWritingPipe(pipes[1]);
radio.openReadingPipe(1,pipes[0]);
}
In "led_remote", I had to wrap the radio.write() call
inside radio.stopListening() and radio.startListening() calls
for any of the sent messages (except occasionally the first one)
to get through to the receiving unit:
p("Now sending...");
radio.stopListening();
bool ok = radio.write( button_states, num_button_pins );
radio.startListening();
if (ok)