max payload ?

Hello guys,

How can i send on nRF24l01 more byte from the 32 byte character array?

Thank you in advance.

How can i send on nRF24l01 more byte from the 32 byte character array?

Make multiple calls.

I agree with @PaulS.

What 32 byte array?

...R

Robin2:
I agree with @PaulS.

What 32 byte array?

…R

Maximum payload size for NRF24l01 is 32 bytes.

Thank you very much all of you for you're time and you're answers .

I have read from an example this command: // enable dynamic payloads radio.enableDynamicPayloads();

This still limit the max size at 32 ?

If i want to send for example unsigned int CodeToRF[100];

is any command, i can use it to call it for example 4 times and send the first 25 then, the next 25 e.t.c like : unsigned int temp[25]; unsigned int CodeToRF[100];

command to copy (temp,CodeToRF ,0,25); send(temp) to nrf24l01

command to copy (temp,CodeToRF ,25,50); send(temp)to nrf24l01

command to copy (temp,CodeToRF ,50,75); send(temp) to nrf24l01

command to copy (temp,CodeToRF ,75,100); send(temp)to nrf24l01

Thank you in advance.

Best Regards, Tasos

One way is to use strncpy()
It will copy a string to the length given, or if it finds a NULL in the source string, will stop, and fill the remaining bytes of the destination with NULLs.

One thing to note about strncpy() is that it does not automatically NULL terminate the destination string (as strcpy() does), so you need to either NULL terminate the destination before the strncpy() or NULL terminate it after the strncpy(). In the following example I have used the former option.

Compile, load, and run. Try to understand what each statement does, then adapt it to your sketch.

char str[] = {"1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-=:;<>?,./~`!@#$%^&*()_+0987654321END!"};
char outputStr[26] = {0};

void setup() {
  Serial.begin(115200);

  Serial.println(str);

  strncpy(outputStr, &str[0], 25); // the & gives the address of str[0]
  Serial.println(outputStr);

  strncpy(outputStr, &str[25], 25);  // the & gives the address of str[25] (and so on)
  Serial.println(outputStr);

  strncpy(outputStr, &str[50], 25);
  Serial.println(outputStr);

  strncpy(outputStr, &str[75], 25);
  Serial.println(outputStr);
}

void loop() {
  // put your main code here, to run repeatedly: 
}

Edit: I hate it when I hit the QUOTE tag icon instead of the CODE tag icon!

tasosstr: Thank you very much all of you for you're time and you're answers .

I have read from an example this command: // enable dynamic payloads radio.enableDynamicPayloads();

This still limit the max size at 32 ?

Yes, the hardware sends at most 32 bytes because that's the size of the FIFO slots. Dynamic payloads means you can send different length packets rather than having to pad-out and discard extra pad bytes.

Thank you very much all of you for you're time and you're explain ! ! !

lar3ry You are a star ! ! ! Thank you very very much for the code it is that i am looking for ! ! ! :)

MarkT Thank you very very much for the explain too ! ! !

Have a nice time guys ! ! !

Best Regards, Tasos