transfer integers NRF24

I have been trying to understand how to transmit several integers via NRF24 using Robib2’s
“Simple nRF24L01+ 2.4GHz transceiver demo”.

Have this very basic array which I would like to transmit from TX and read it as integers on the RX module.

int Data[4];     
  int i;               

void setup() {
  Serial.begin(9600);
 }

void loop() {
  
  Data[0] = 6;    
  Data[1] = 56;  
  Data[2] = 166;
  Data[3] = 2266;
 
 
  
  
  for (i = 0; i < 4; i++) 
  
    Serial.println(Data[i]);
    
    delay (2000);
Serial.println ("                      ......");
}

Can anyone please show me how I can incorporate this array into the above NRF Demo please.

By "show me " I am hoping someone has the patience to show me the specific line of code I should write and what each command achieves.

Thanks

Assuming that you have got Robin’s examples working then :

To send the array

void send()
{
  bool rslt;
  rslt = radio.write( &arrayName, sizeof(arrayName) );
  if (rslt)
  {
    Serial.println("  Acknowledge received");
  }
  else
  {
    Serial.println("  Tx failed");
  }
}

To receive the array

void getData()
{
  if ( radio.available() )
  {
    radio.read( &arrayName, sizeof(arrayName) );
    newData = true;
  }
}

I hope that it goes without saying that the array has to be declared on the Rx side

Thanks for the reply I will see how I go with it in the Morning.

Could you explain the term "bool rslt;" doe's?

Is the "rslt" just like naming a variable and could it just have been any word at all?

As I cannot find any expression called "rslt" I assume that it is not a function.

Also the "if rslt".

It seems to me that "if" checks that there is a value to "rslt" and if there is it prints an acknowledgement.

Thanks for your time

Farticus:
Is the "rslt" just like naming a variable and could it just have been any word at all?

Yes it is a variable. You could call it "elephant"

Also the "if rslt".

That's exactly the same as

if (rslt == true) {

...R