user7817: I have a pair of nRF24L01s connected to a pair of Arduino Unos and I'm using the RF24 library from here: RF24 library. When I run the pingpair example sketch, the radios transmit and receive back and forth just fine. So I tried to program my own very simple example but I'm running into a problem where the first message transmits successfully (and is received successfully), however, subsequent messages fail to send. The call to radio.write() returns false.
I'm using the following code on the 'sender':
RF24 radio(9,10);
const uint64_t pipes[2] = { 0xF0F0F0F0E1LL, 0xF0F0F0F0D2LL };
uint8_t payload[1];

void setup() {
  Serial.begin(9600);
  radio.begin();
  radio.setRetries(15, 15);
  radio.setPayloadSize(1);
  radio.openWritingPipe(pipes[0]);
}

void loop() {
  payload[0] = 1;
  bool ok = radio.write(payload, 1);
  Serial.println("Status: " + (String) ok);
  delay(200);
}

And the following on the 'receiver':
RF24 radio(9,10);
const uint64_t pipes[2] = { 0xF0F0F0F0E1LL, 0xF0F0F0F0D2LL };
uint8_t payload[1];

void setup() {
  Serial.begin(9600);
  radio.begin();
  radio.setRetries(15, 15);
  radio.setPayloadSize(1);
  radio.openReadingPipe(1, pipes[0]);
  radio.startListening();
  Serial.println("Listening: " );
}

void loop() {
  if (radio.available()) {
    bool done = false;
    while (!done) {
      done = radio.read(payload, 1);
      Serial.println("Got payload: " + (String) payload[0]);
    }
  }
}

I'm guessing the problem has to be with my code because the example sketches work, but I can't figure out what the problem is. Again to summarize, when I reset the Arduino, the first call to radio.write() returns true and the message is transmitted. After that, subsequent calls to radio.write() return false.
Also note that I did try adding a 10uF capacitor across +3.3V and Ground but it did not help.
Thanks for any help.

user4024: Comparing your rx against the example, i would suggest not having the while done statement. You could also throw in a few serial.write debug lines in both sketches, to log different parts of the code, to find where its getting stuck.

user15133: I was just having this issue. You need to be able to read and write on both ends. You send up sending an ack package back to the sending arduino like in the test sketch.
You ripped that part out.
You need to read back through the example code and line by line understand what the data is doing and why it's doing it that way before you can start using rf24.
The short of it is that the sender will send data and then finish and wait for a response packet before sending the next one. The reciever works much the same way except it always will be listening for incoming data until the sender message ends. Then it in turn will send a reply packet saying that it recieved the first packet.
Make sure that the reciever isn't looping waiting for packets. It should only respond once it recieves something. The sender should have a timeout on it so that it knows that it's messages are failing. This is also incredibly important for debugging so you can see who failed and why. 
This is basically tcp at work. 
You can also use noack and that's called udp

7817: <p>I have a pair of nRF24L01s connected to a pair of Arduino Unos and I'm using the RF24 library from here: <a href="https://github.com/maniacbug/RF24" rel="nofollow noreferrer">RF24 library</a>. When I run the pingpair example sketch, the radios transmit and receive back and forth just fine. So I tried to program my own very simple example but I'm running into a problem where the first message transmits successfully (and is received successfully), however, subsequent messages fail to send. The call to radio.write() returns false.</p>

<p>I'm using the following code on the 'sender':</p>

<pre><code>RF24 radio(9,10);
const uint64_t pipes[2] = { 0xF0F0F0F0E1LL, 0xF0F0F0F0D2LL };
uint8_t payload[1];

void setup() {
  Serial.begin(9600);
  radio.begin();
  radio.setRetries(15, 15);
  radio.setPayloadSize(1);
  radio.openWritingPipe(pipes[0]);
}

void loop() {
  payload[0] = 1;
  bool ok = radio.write(payload, 1);
  Serial.println("Status: " + (String) ok);
  delay(200);
}
</code></pre>

<p>And the following on the 'receiver':</p>

<pre><code>RF24 radio(9,10);
const uint64_t pipes[2] = { 0xF0F0F0F0E1LL, 0xF0F0F0F0D2LL };
uint8_t payload[1];

void setup() {
  Serial.begin(9600);
  radio.begin();
  radio.setRetries(15, 15);
  radio.setPayloadSize(1);
  radio.openReadingPipe(1, pipes[0]);
  radio.startListening();
  Serial.println("Listening: " );
}

void loop() {
  if (radio.available()) {
    bool done = false;
    while (!done) {
      done = radio.read(payload, 1);
      Serial.println("Got payload: " + (String) payload[0]);
    }
  }
}
</code></pre>

<p>I'm guessing the problem has to be with my code because the example sketches work, but I can't figure out what the problem is. Again to summarize, when I reset the Arduino, the first call to <code>radio.write()</code> returns true and the message is transmitted. After that, subsequent calls to <code>radio.write()</code> return false.</p>

<p>Also note that I did try adding a 10uF capacitor across +3.3V and Ground but it did not help.</p>

<p>Thanks for any help.</p>
 4024: <p>Comparing your rx against the example, i would suggest not having the while done statement. You could also throw in a few serial.write debug lines in both sketches, to log different parts of the code, to find where its getting stuck.</p>
 15133: <p>I was just having this issue. You need to be able to read and write on both ends. You send up sending an ack package back to the sending arduino like in the test sketch.</p>

<p>You ripped that part out.</p>

<p>You need to read back through the example code and line by line understand what the data is doing and why it's doing it that way before you can start using rf24.</p>

<p>The short of it is that the sender will send data and then finish and wait for a response packet before sending the next one. The reciever works much the same way except it always will be listening for incoming data until the sender message ends. Then it in turn will send a reply packet saying that it recieved the first packet.</p>

<p>Make sure that the reciever isn't looping waiting for packets. It should only respond once it recieves something. The sender should have a timeout on it so that it knows that it's messages are failing. This is also incredibly important for debugging so you can see who failed and why. </p>

<p>This is basically tcp at work. </p>

<p>You can also use noack and that's called udp</p>
