What happens if you connect directly to the esp-01?
Also what are you using for level shifters between the Mega and the esp-01? Mega 5v device, esp-01 3.3v device.
So, what means "connect directly"? Without Mega? If yes, how? You're very kind. Thank you!
I have 3.3v using one more component that has Vin = 5v and Vout = 3.3v (and a common GND as third pin)
To get started have a look here https://medium.com/@nowir3s/getting-started-with-esp8266-875fb54441d6