ESP32 to Arduino mega UART communication

Hi,
I'm transmitting data packet over UART from ESP32 to Arduino mega using SerialTransfer.h library.
When I tested it with ESP32 as a receiver, code is working perfect. But when I switch receiver to Arduino mega I don't get transmitted values. Can someone guide me to solve this problem?

Have you taken into account that the Mega is a 5V device and the ESP is a 3V3 device ?

If you want more help please post your code, using code tags when you do

@UKHeliBob I'm using a level shifter for that case

Not without seeing your ESP32 and Mega code ............................

Solved the problem. It occurs in Serial.println().

So what exactly was the problem ?

I added several Serial.println(data) to print incoming data. Then instead of Serial.println() I added Serial.print space.

Such a change should not make a difference to whether the ESP32 could receive the data or not unless the code running on the ESP32 was different to that running on the Mega

Was the code the same in both cases and which Serial interfaces were you using on each receiver ?

If only you had posted your code ...

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.