anyone familiar with rf24?

Today I started messing with the idea of getting an arduino uno to autoconnect with another arduino uno using the nrf24l01 breakouts.

I dont have a particular goal in mind per se but was just wanting to get the logistics down so I started simple as pie. One arduino at address 0x0000000B LL sends a one element array over and over. Easy.

The second arduino goes through a for loop in the void loop().

The for loop is set to loop 16 times. It starts with the address 0x00000000 LL and checks to see if radio.available is true. if it is, the program simply states it has found an address over serial. If not it states the address is invalid. afterwards it increments the address by one and repeats until the address gets to 0x0000000F LL (or the for loop repeats 16 times.)

once the address gets to 0x0000000B (or the transmitter address) it states that it has found an address over serial. So far so good!

Now the problem arises when the address increments to the next address. No matter what I seem to do or change, once radio.available() becomes true once…it seems to stay true until the function is called again from the main loop in which case it repeats the same scenario. I have worked hours on such a small program to no avail. Can someone help please??? I must be overlooking the most simple of things but for the life of me I have no idea what.

Super Simple TX Code.

#include <nRF24L01.h>
#include <RF24.h>

RF24 radio(8,9);
uint64_t myAddress = 0x0000000BLL;
byte txData[] = {1};

void setup()
{
  while (!Serial);
    Serial.begin(9600);

  radio.begin();
  radio.setRetries(15, 15);
  radio.openWritingPipe(myAddress);
}

void loop()
{
  if( Serial.available() )       
    {;}
  
  radio.write(txData,sizeof(txData) );
  Serial.println("Sent a packet");
}

RX CODE

#include <nRF24L01.h>
#include <RF24.h>

RF24 myRadio(8, 9);

byte rxData[] = {0};

void setup()
{
  while (!Serial);
    Serial.begin(9600);
  
  myRadio.begin();
  myRadio.setRetries(15, 15);
}


void loop()
{
  if( Serial.available() ) 
    {;}
    //function that searches through a set of 16 addresses   
    searchAddresses();
}


void searchAddresses()
{
  //declare a temp address variable
  //and initialize it to first possible address
  uint64_t tempAddress = 0x00000000LL;
  
  myRadio.openReadingPipe(1, tempAddress);
  myRadio.startListening();
   
  for (int x =0; x < 16; x++)
  {
      if ( myRadio.available() )
      {
        myRadio.read(rxData, sizeof(rxData) );
        Serial.println("Found an address");
      }
      else
      {
        Serial.println("Address Invalid");    
      }
      //increment temporary address to next address
      tempAddress++;
      
      myRadio.openReadingPipe(1, tempAddress);
      myRadio.startListening();
  }
}

I haven’t yet got around to get an nRF24L01 setup working, but I have read quite a bit on the topic. Many people have commented that certain channel (pipe) addresses cause problems, with simple ones being particularly bad. Avoid zeros!

There is quite a bit of expertise on the Arduino forum, so check there.

NRF24L01 are RF modules which are used for wireless communication. They are quite easily interfaced with Arduino boards. You should download their Arduino Library and then use its example. I have worked on it and I have used RF24 Library, you should have a look at this tutorial [Interfacing of Arduino with NRF24L01 in this tutorial, they have given the code as well as circuit diagram of Arduino with NRF24L01.

I have used this same example when I was working on this project but I have also added a 100uF capacitor in between 3.3V and GND of NRF24L01.

Thanks.](http://www.theengineeringprojects.com/2015/07/interfacing-arduino-nrf24l01.html)