How can I send array from arduino to another arduino?

hi you guys!

I wanna send this array (int array[5] ={“A”,“B”,“C”,“D”,“E”}:wink:

I have 2 arduino so i will send array from one arduino to another arduino. (by using NRF24L01)
but I don’t know how to send…

plz help me …

My source code is very complex… sorry
can you fix it?

#include <SPI.h>
#include <nRF24L01.h>
#include <RF24.h>
RF24 radio(7, 8);

String readStr(){
String str = “A,B,C,D,E”;
char c;

int arr[5] = {“A”,“B”,“C”,“D”,“E”};

while (Serial.available())
{
c = Serial.read();
str.concat(c);
delay(10);

}
return str;
}

void setup() {

Serial.begin(9600);
radio.begin();
radio.openWritingPipe(address);
radio.setPALevel(RF24_PA_MIN);

radio.stopListening();

}

void loop() {

if (radio.available())
{
String str;
str = readStr();

Serial.println(“Hello world”);

radio.write(arr ,sizeof(arr));

delay(1000);
}
}

Take a look here: http://forum.arduino.cc/index.php?topic=396450

Here too: http://arduino-info.wikispaces.com/Nrf24L01-2.4GHz-HowTo

int arr[5] = {"A","B","C","D","E"};

Does this even compile??

There's a "Serial communication basics" post around here - I don't have the link but it should be easy enough to find - have a look at that. Whether the communication is over a wire or not doesn't really matter.

Have a look at this Simple nRF24L01+ Tutorial

To define an array like this

int arr[5] = {"A","B","C","D","E"};

you should use single quotes as you are referring to single characters.

...R