I can send data to XCTU from Arduino but can’t send data to Arduino from any ot

Hello, I can send data to XCTU from Arduino but can’t send data to Arduino from any other Arduino. May i ask if there is somebody who can help me ?

Have you set the PAN Id and address for both xbee devices?
Give full details of the project including the xbee type (s1, s2, s3 etc.) and the code for both Arduinos.

PAN ID is correct. The lights are on when I send data anyway.

This is the transmitter code. It takes keyboard data from an application called Unity and gives it to the other xbee via xbee.

#include <SoftwareSerial.h>

SoftwareSerial xbee(14, 15); // RX, TX

void setup()
{
Serial.begin(9599);

xbee.begin(9600);
}

int Speed;
void loop() {

if(Serial.available()){
char c = Serial.read();
if(c == ‘W’){
Speed += 5;
}
if(c == ‘S’){
Speed -= 5;
}
if(Speed > 60){
Speed = 60;
}
if(Speed < 0){
Speed = 0;
}
xbee.println(Speed);
xbee.println(c);
}
}

The receiver code directly receives and prints the data, but did not

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

void loop()
{
if(Serial.available()){
char c = Serial.read();
Serial.println(c);
}
else{
Serial.println(“Suanlik veri yok”);
}
delay(1000);
}

Why the strange baud rate of 9599 ?
What's wrong with 9600 ?

If the sender is a Mega then there is no need for software serial as pins 14 and 15 correspond to Serial3, so you can send data using Serial3.print().

Why is there a delay(1000) in the receiver code?

Hello, do you have the opportunity to change and write the code? I do not understand much because of the language problem. I use Ardunio Mega.

The reason I use 9559 is because I am sending data from Unity program to port 9600 and from there it tries to transfer it to xbee against backend.

Show the Unity code that opens the serial port. On Windows it will look something like this

 SerialPort sp = new SerialPort("COM4", 9600);

9600 is the baud rate, not the port number.
COM4 is the name of the serial port.

Yes, data from Unity exactly like this

As you said, I do not think there is a problem here, there is a problem in Arduino.

Set the Unity baud rate to 9600 and change the Arduino code to

Serial.begin(9600);

NOT WORKİNG

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

int Speed;
void loop() {

if(Serial.available()){
char c = Serial.read();
if(c == ‘W’){
Speed += 5;
}
if(c == ‘S’){
Speed -= 5;
}
if(Speed > 60){
Speed = 60;
}
if(Speed < 0){
Speed = 0;
}
Serial.println(Speed);
}
}

The code doesn't work even though I do it like this.

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

int Speed;
void loop() {
Serial.println("selam");
}

i need help

XCTU with Arduino work but Ardunio - Arduino not working