Xbee wireless Arduino Help!!

I cannot communicate between two arduinos connected to Xbees.

Here is my transmitting code:

void setup()
{
Serial.begin(9600);
pinMode(A0, INPUT);
}

void loop()
{
int sensorValue = analogRead(A0);

Serial.write(sensorValue);

}

Here is my receiving code

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

void loop()

{
int heartValue = Serial.read();

digitalWrite(A0, heartValue / 4);
}

I cannot communicate between two arduinos connected to Xbees.

You actually have to attach them to the Arduinos.

You might think that we can read minds, but, you'd be mistaken. Telling us which XBees, how you have configured them, and how they are connected to the Arduinos is going to be necessary if we are to offer more than sympathy.

  pinMode(A0, INPUT);

You just diddled with the digital pin. Why? It is not necessary, or possible, to set the mode of the input-only analog pins.

   int heartValue = Serial.read();

   digitalWrite(A0, heartValue / 4);

Good idea, there, reading data that might not be present. The digitalWrite() function's second argument is either 0 or 1, not something between 0 and 255.

Serial.write() takes a byte argument, not an int argument. Doing the divide by 4 on the sender makes more sense than doing it on the receiver.