Serial command on Wemos D1R2

Hello everyone. I need to transmit data from Arduino Mega to Wemos D1R2. I search some results and guided using Serial command. In Arduino Mega, I used pin 7 and 8. In Wemos D1R2, I used pin D4 and D4. Everything works well on Arduino Mega, but Serial command doesn't work on Wemos D1R2. Can anyone help me?

Without seeing your programs it is impossible to know what you are doing.

Also post an example of the output from your two programs. The words "doesn't work" don't convey any information that we could use to help you.

Using pins 7 and 8 on a Mega seems strange. The spare HardwareSerial pins are numbered 14 to 19.