My ESP-01 is not respoding with Arduino mega

I’d suggest that you post your full sketch, correctly formatted with triple backticks at the beginning and end of the code.
Triple backticks look like this:
```

Pete.