Problem with serial communication WeMOS Mega + WiFi R3 ATmega2560 + ESP8266

Hello,
my current project is to build a robot that I can controll via the Blynk app.
Therefore I bought an “WeMOS Mega + WiFi R3 ATmega2560 + ESP8266”-board
(Wemos Mega + WiFi r3 ATMEGA 2560 + esp8266 USB-TTL Arduino Mega nodemcu USA | eBay)

Setting up the Blynk app and reading the data with the onboard-ESP8266 was no issue.
But transfering the data to the Mega is a huge problem.
I never used serial communication between two boards. In my opinion the problem is somewhere on the Mega-side as I can read the data sent by the esp8266 with the serial monitor in the Arduino IDE.
I want to send the X and Y values of the joystick in the blynk app (and later on some other values).
Right now I’m testing if the mega recieves the data with two LEDs.
Could someone please have a look on my codes?

On the ESP side:

#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include  <BlynkSimpleEsp8266.h>
#include <SoftwareSerial.h>
#include <SPI.h>


// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "TOKEN";
char ssid[] = "SSID";
char pass[] = "PASSWORT";

String ESP2Arduino;
int x=0; //Ausgelesener x-Wert von Joystick
int y=0; //Ausgelesener y-Wert von Joystick
int maeh=0;

//Joystick X-Achse auslesen
BLYNK_WRITE(V0) { 
  x = param[0].asInt();
}


//Joystick Y-Achse auslesen
BLYNK_WRITE(V1) {
  y = param[0].asInt();
}

void setup()
{
  // Debug console
  Serial.begin(9600);

  Blynk.begin(auth, ssid, pass);
}

void loop()
{
  Blynk.run();
  send2Arduino();
  
}

void send2Arduino()
{
  ESP2Arduino = ESP2Arduino + x + "," + y + "," + maeh;
  Serial.println(ESP2Arduino);
  delay(10);
  ESP2Arduino= "";
 }

On the Mega side:

#include <SoftwareSerial.h>
#include <Adafruit_GFX.h>  // Include core graphics library for the display
#include <Adafruit_SSD1306.h>  // Include Adafruit_SSD1306 library to drive the display
int Variable1;

Adafruit_SSD1306 display(128, 64);  // Create display

String FromESP;
int SteuerX=0;
int SteuerY=0;
int Maehwerk=0;
int empfangen=0;
int led_pinblau=2; //PWM pin 2 for testing
int led_pingruen=3; //PWM pin 3 for testing


void setup() {
  Serial.begin(9600);
  // put your setup code here, to run once:
  delay(100);  // This delay is needed to let the display to initialize
  display.begin(SSD1306_SWITCHCAPVCC, 0x3C);  // Initialize display with the I2C address of 0x3C
  display.clearDisplay();  // Clear the buffer
  display.setTextColor(WHITE);  // Set color of the text
  display.setTextWrap(false);  // By default, long lines of text are set to automatically “wrap” back to the leftmost column.
                               // To override this behavior (so text will run off the right side of the display - useful for
                               // scrolling marquee effects), use setTextWrap(false). The normal wrapping behavior is restored
                               // with setTextWrap(true).

  pinMode(led_pinblau, OUTPUT);
  pinMode(led_pingruen, OUTPUT);
}

void loop() {
 //testing if data recieved
 analogWrite(led_pinblau,SteuerX);
 analogWrite(led_pingruen,SteuerY);

  display.clearDisplay();  // Clear the display so we can refresh
  // Print text:
  display.setCursor(0, 10);  // (x,y)
  display.println(FromESP);  // Text or value to print
  display.println("Test");  // Text or value to print
  display.display();  // Print everything we set previously

}

void ReadFromESP(){
  // if there's any serial available, read it:
  while (Serial.available() > 0) {
    // look for the next valid integer in the incoming serial stream:
    int SteuerX = Serial.parseInt();
    // do it again:
    int SteuerY = Serial.parseInt();
    // do it again:
    int Maehwerk = Serial.parseInt();

  }
  }

I am very grateful for any advise/ help.

Thanks, Max

Your Mega code never calls the ReadFromESP() function so how would it ever receive anything? The boards like this I have seen have DIP switches to configure the communication. Read this thread to make sure you have it configured correctly and the ESP to connected to the Mega.

You can also read Robin2's excellent tutorial Serial Input Basics to learn how to do good, reliable serial communication. There is also the SerialTransfer library that you can download from the Library Manager in the IDE.

blh64:
Your Mega code never calls the ReadFromESP() function so how would it ever receive anything? The boards like this I have seen have DIP switches to configure the communication. Read this thread to make sure you have it configured correctly and the ESP to connected to the Mega.

You can also read Robin2's excellent tutorial Serial Input Basics to learn how to do good, reliable serial communication. There is also the SerialTransfer library that you can download from the Library Manager in the IDE.

Thank you very much, such an idiot mistake I coded the function but didn't call ist.
By checking with an clearer head I noticed that I used local variables with the same name as the global ones (which I want to use) inside my ReadFromESP() function.
So I changed: int SteuerX = Serial.parseInt()
into: SteuerX = Serial.parseInt() // so I deleated the int

But I still don't see anything.