user32814: I'm trying to send a char [] through an NRF2401 but the radio.write () method always return 0. Check that msg contains the message read from str.
#define TAM 50

RF24 radio(9,10);

const uint64_t pipe = 0xE8E8F0F0E1AA;

char  msg[TAM];

void setup() {

  Serial.begin(9600);

  radio.begin();

  radio.openWritingPipe(pipe);
}

void loop() {
    if(Serial.available() > 0){
      String str = Serial.readString();
      str.toCharArray(msg,TAM);
      if(!radio.write(msg, TAM)){
        Serial.println("Message not send");
      }
      else
        Serial.println(msg);
    }
}

What am I doing wrong?
Edit1:
What I have noticed, is that the first time I was allowed to send it but the others no longer.
Edit2:
Remove the keyboard input by a char [] and sent it to without problems. Why can this be? Anything else happen when I make a keyboard entry?

user68155: I hope you resolved your issue by now, but I had the same problem with an Arduino UNO/nRF24l01+ combination and this question was one of the search results.
In my case, the write() call returned false, but the receiver received the message.
As soon as I added one of the ubiquitous Adapter Boards into the mix the write() call started returning true.
My uneducated guess is that the sending and then the switch from transmit to receive and then waiting to receive the ACK used a bit too much power or something like that.
In any case, even though everyone recommends adding a capacitor and I had the adapter boards on hand, I had thought to tough it out without one and see how far I could get.
I kicked myself for the wasted time, but I learned a lot in the process and I'm having a lot of fun with the transceiver boards now. I'm glad that I didn't just shrug and say "well the message got through so who cares?"

32814: <p>I'm trying to send a char [] through an NRF2401 but the radio.write () method always return 0. Check that msg contains the message read from str.</p>

<pre><code>#define TAM 50

RF24 radio(9,10);

const uint64_t pipe = 0xE8E8F0F0E1AA;

char  msg[TAM];

void setup() {

  Serial.begin(9600);

  radio.begin();

  radio.openWritingPipe(pipe);
}

void loop() {
    if(Serial.available() &gt; 0){
      String str = Serial.readString();
      str.toCharArray(msg,TAM);
      if(!radio.write(msg, TAM)){
        Serial.println("Message not send");
      }
      else
        Serial.println(msg);
    }
}
</code></pre>

<p>What am I doing wrong?</p>

<p><strong>Edit1:</strong>
What I have noticed, is that the first time I was allowed to send it but the others no longer.</p>

<p><strong>Edit2:</strong>
Remove the keyboard input by a char [] and sent it to without problems. Why can this be? Anything else happen when I make a keyboard entry?</p>
 68155: <p>I hope you resolved your issue by now, but I had the same problem with an Arduino UNO/nRF24l01+ combination and this question was one of the search results.</p>
<p>In my case, the write() call returned false, but the receiver received the message.</p>
<p>As soon as I added one of the ubiquitous <a href="https://www.google.com.au/search?q=nrf24l01%2B%20adapter%20board" rel="nofollow noreferrer">Adapter Boards</a> into the mix the write() call started returning true.</p>
<p>My uneducated guess is that the sending and then the switch from transmit to receive and then waiting to receive the ACK used a bit too much power or something like that.</p>
<p>In any case, even though <a href="https://arduinoinfo.mywikis.net/wiki/Nrf24L01-2.4GHz-HowTo" rel="nofollow noreferrer">everyone recommends adding a capacitor</a> and I had the adapter boards on hand, I had thought to tough it out without one and see how far I could get.</p>
<p>I kicked myself for the wasted time, but I learned a lot in the process and I'm having a lot of fun with the transceiver boards now. I'm glad that I didn't just shrug and say &quot;well the message got through so who cares?&quot;</p>
