error in code with two Adruino and two Xbee Radio

Hi every one
i have code that takes measurements of wind speed using Anemometer. It takes measurements from the XBee radio S2C(router or sender) in one Arduino Uno and sends the data to another Xbee radio S2C (coordinator or receiver) in another Arduino.
the problem now is that I want to add a led in the receiver/coordinator which light if the wind speed measurement is greater than 3 but it does not work!
can anyone tell me what is the wrong with the code, please ? :frowning:

code sender
/*

This code takes the output from an anemometer and converts it into a wind speed.

*/
#include <Wire.h>

//Setup Variables

const int sensorPin = A0; //Defines the pin that the anemometer output is connected to
int sensorValue = 0; //Variable stores the value direct from the analog pin
float sensorVoltage = 0; //Variable that stores the voltage (in Volts) from the anemometer being sent to the analog pin
float windSpeed = 0; // Wind speed in meters per second (m/s)

float voltageConversionConstant = .004882814; //This constant maps the value provided from the analog read function,
//which ranges from 0 to 1023, to actual voltage, which ranges from 0V to 5V
int sensorDelay = 1000; //Delay between sensor readings, measured in milliseconds (ms)

//Anemometer Technical Variables
//The following variables correspond to the anemometer sold by Adafruit, but could be modified to fit other anemometers.

float voltageMin = .4; // Mininum output voltage from anemometer in mV.
float windSpeedMin = 0; // Wind speed in meters/sec corresponding to minimum voltage

float voltageMax = 2.0; // Maximum output voltage from anemometer in mV.
float windSpeedMax = 32; // Wind speed in meters/sec corresponding to maximum voltage

void setup()
{
Serial.begin(9600); //Start the serial connection
}

void loop()
{
sensorValue = analogRead(A0); //Get a value between 0 and 1023 from the analog pin connected to the anemometer

sensorVoltage = sensorValue * voltageConversionConstant; //Convert sensor value to actual voltage

//Convert voltage value to wind speed using range of max and min voltages and wind speed for the anemometer
if (sensorVoltage <= voltageMin){
windSpeed = 0; //Check if voltage is below minimum value. If so, set wind speed to zero.
}

else {
windSpeed = (sensorVoltage - voltageMin)*windSpeedMax/(voltageMax - voltageMin); //For voltages above minimum value, use the linear relationship to calculate wind speed.
}
//Print voltage and windspeed to serial
Serial.print(“Time: “);
Serial.print(millis());
Serial.print(”\t”);
Serial.print("Wind speed: ");
Serial.println(windSpeed);
delay(sensorDelay);
}

code receiver
const int x =3;
void setup()
{
Serial.begin(9600); //Start the serial connection
delay(1000);//enter AT mode finish
while(Serial.available()>0){
Serial.write(Serial.read());
}
pinMode(LED_BUILTIN, OUTPUT);
}

void loop(){
while(Serial.available()>0){
if (windSpeed > x){
digitalWrite(LED_BUILTIN, HIGH);
}
else {
digitalWrite(LED_BUILTIN, LOW);
}
}
while(Serial.available()>0){
Serial.write(Serial.read());
}

delay(750);//3/4 a sec
}

while(Serial.available()>0){
if (windSpeed > x){
  digitalWrite(LED_BUILTIN, HIGH);
  }
else {
  digitalWrite(LED_BUILTIN, LOW);
}

I don't see where you read the Serial to get a value for windSpeed.

The serial input basics tutorial might have information that you can use.

can anyone tell me what is the wrong with the code, please ?

It is posted without code tags in the wrong section of the forum.