user27603: I connect my ESP to Arduino to my PC.
If I send AT commands from my serial monitor, I receive full response. I use 115200 and both NL & CR in my serial monitor.
ESP TX is connected to TX Arduino, same for RX.
The problem is when I try to send commands from my Arduino code. I don't receive any response. I use same 115200 both for serial and for ESP8266.
I user this code: 
#include <SoftwareSerial.h>
SoftwareSerial esp8266(0,1);

void setup()
{
    Serial.begin(115200);
    esp8266.begin(115200);
}

void loop()
{
    sendCommand("AT+GMR\r\n");
}

String sendCommand(String command, const int timeout, boolean debug)
{
    String come = "";

    while(esp8266.available())
    {
        char c = esp8266.read(); // read the next character.
        Serial.write(c);
        come += c;
    }  
    Serial.println(come); 
    return come;
}

I can't see what is wrong here and why that works with just the Serial Monitor. 

user4143: Make a choice:

Are you using pins 0 and 1 for communicating with the PC, or
Are you using pins 0 and 1 for communicating with the ESP8266?

You cannot do both. 
Move the ESP8266 onto some other pins.

user28768: When you are using Arduino board just as USB --> RS232 converter then you have to, as you said, connect TX to TX and RX to RX. But when you want communication between microcontroler and ESP then you have to connect TX to RX and RX to TX. Here I explained that in details.

27603: <p>I connect my ESP to Arduino to my PC.</p>

<p>If I send AT commands from my serial monitor, I receive full response. I use 115200 and both NL &amp; CR in my serial monitor.</p>

<p>ESP TX is connected to TX Arduino, same for RX.</p>

<p>The problem is when I try to send commands from my Arduino code. I don't receive any response. I use same 115200 both for serial and for ESP8266.</p>

<p>I user this code: </p>

<pre><code>#include &lt;SoftwareSerial.h&gt;
SoftwareSerial esp8266(0,1);

void setup()
{
    Serial.begin(115200);
    esp8266.begin(115200);
}

void loop()
{
    sendCommand("AT+GMR\r\n");
}

String sendCommand(String command, const int timeout, boolean debug)
{
    String come = "";

    while(esp8266.available())
    {
        char c = esp8266.read(); // read the next character.
        Serial.write(c);
        come += c;
    }  
    Serial.println(come); 
    return come;
}
</code></pre>

<p>I can't see what is wrong here and why that works with just the Serial Monitor. </p>
 4143: <p>Make a choice:</p>

<ol>
<li>Are you using pins 0 and 1 for communicating with the PC, or</li>
<li>Are you using pins 0 and 1 for communicating with the ESP8266?</li>
</ol>

<p><strong>You cannot do both.</strong> </p>

<p>Move the ESP8266 onto some other pins.</p>
 28768: <p>When you are using Arduino board just as USB --> RS232 converter then you have to, as you said, connect TX to TX and RX to RX. But when you want communication between microcontroler and ESP then you have to connect TX to RX and RX to TX. <a href="https://arduino.stackexchange.com/questions/30689/arduino-uno-and-esp8266-serial-monitor-issue/31929#31929">Here</a> I explained that in details.</p>
