I wonder if anyone can help. I just KNOW this is going to be a silly question but..
I'm using one Arduino with RF24 library to send to another - for now just the one direction.... no problem.. If I turn off the transmitting board and turn it back on - all is well... however if I turn off the receiving board and turn that back on - no further sending is possible..
Here's an abbreviated version of my programs missing out all but radio.. what on earth am I doing wrong..
SENDING BOARD relevant inits
#include <RF24.h>
RF24 radio(8,3);
const uint64_t pipes[2] = { 0xF0F0F0F0E1LL, 0xF0F0F0F0D2LL };
SENDING board... the SETUP function..
radio.begin();
radio.openWritingPipe(pipes[0]);
radio.openReadingPipe(1,pipes[1]);
radio.enableDynamicPayloads() ;
radio.setAutoAck( true ) ;
radio.powerUp() ;
radio.startListening()
SENDING board - the LOOP.
radio.stopListening();
radio.write( &payload, sizeof(payload) );
radio.startListening();
Ok, so now the RECEIVING BOARD
#include <RF24.h>
RF24 radio(9,10);
// Radio pipe addresses for the 2 nodes to communicate.
const uint64_t pipes[2] = { 0xF0F0F0F0E1LL, 0xF0F0F0F0D2LL };
RECEIVING BOARD SETUP
radio.openWritingPipe(pipes[1]);
radio.openReadingPipe(1,pipes[0]);
radio.enableDynamicPayloads() ;
radio.setAutoAck( true ) ;
radio.powerUp() ;
radio.startListening();
RECEIVING BOARD - LOOP...
if ( radio.available() )
{
bool done = false;
while (!done)
{
done = radio.read(&payload, sizeof (payload));
}
radio.stopListening();
// some very quick stuff in here
radio.startListening();