String and Character array data Transmission problem using NRF24L01

hello to all,

i want to transmit a Text String Using Nrf24L01, and the String can be changed time to Time using 4*4 Keypad
in the code Given below , i had equalize The Character array with a String Message (i.e.- char text[300]=message; and String message="text that can be changed time to time using Keypad")

but it creating a problem , any how i want to take message in form of String and Transmission can be done in any way that's not problem
i had attached my code here

#include <SPI.h>  
#include "RF24.h"
RF24 myRadio (10 , A1);
byte addresses[][6] = {"0"};
String message = "ABCD";

void setup() {
  Serial.begin(2000000);
  delay(1000);
  myRadio.begin();   
  myRadio.setPALevel(RF24_PA_MAX);
  myRadio.setDataRate( RF24_250KBPS );
  myRadio.openWritingPipe(addresses[0]);
}
void loop() {
    struct package {
    int id=1;
    float temperature = 18.3;
    //char  text[300] = "Text to be transmit";
    char text[300] = message;
  };
  typedef struct package Package;
  Package data;
  myRadio.write(&data, sizeof(data)); 
  Serial.print("\nPackage:");
  Serial.println(data.id);
  Serial.println(data.temperature);
  Serial.println(data.text);
  data.id = data.id + 1;
  data.temperature = data.temperature+0.1;
}

please help me

Have a look at this Simple nRF24L01+ Tutorial.

Wireless problems can be very difficult to debug so get the wireless part working on its own before you start adding any other features.

The examples are as simple as I could make them and they have worked for other Forum members. If you get stuck it will be easier to help with code that I am familiar with. Start by getting the first example to work

Separately, it is not a good idea to use the String (capital S) class on an Arduino as it can cause memory corruption in the small memory on an Arduino. This can happen after the program has been running perfectly for some time. Just use cstrings - char arrays terminated with '\0' (NULL).

...R