ESP8266 can be managed without PC connection

Hi , I configured the ESP8266 with arduino nano, and works OK, when connected to PC, but when I try to use with his own power disconnected from the PC, doesn’t work

Below is my code, I taked off the references to the Serial communication with PC. and in this example I connected to a button and led, If I not try to communicate with ESP8266 works ok, but when I push the button to try to configure the ESP, doesn’t work and a led that I configure to tell me when the instructions has send to ESP, begins to turn on and turn off even if I didn’t pushed the button.

#include <SoftwareSerial.h>

#define DEBUG false

SoftwareSerial esp8266(3,2);
int led_status = 8;
int boton_reset = 9;
int b2 = 12;

void setup()
{
/*
if (DEBUG)
Serial.begin(19200);
*/
esp8266.begin(115200);
pinMode(led_status, OUTPUT);
pinMode(boton_reset, INPUT);
pinMode(b2, INPUT);
//sendData(“AT+RST\r\n”,2000,DEBUG);
//sendData(“AT+CWMODE=3\r\n”,2000,DEBUG);
digitalWrite(led_status, HIGH);
//if (DEBUG)
//Serial.print(“ready\n”);
}

void loop()
{

int boton_reset_state = digitalRead(boton_reset);
if (boton_reset_state == 1) {

// if (DEBUG)
// Serial.print(“reset state\n”);

digitalWrite(led_status, LOW);
delay(1000);
// sendData(“AT+RST\r\n”,2000,DEBUG);
// sendData(“AT+CWMODE=3\r\n”,2000,DEBUG);
// sendData(“AT+CIPMUX=1\r\n”,2000,DEBUG);
// sendData(“AT+CIPSERVER=1,80\r\n”,2000,DEBUG);
digitalWrite(led_status, HIGH);
}

int b12r = digitalRead(b2);
if (b12r == 1) {

sendData(“AT+RST\r\n”,2000,DEBUG);
sendData(“AT+CWMODE=3\r\n”,2000,DEBUG);
sendData(“AT+CIPMUX=1\r\n”,2000,DEBUG);
sendData(“AT+CIPSERVER=1,80\r\n”,2000,DEBUG);
digitalWrite(led_status, LOW);
}

}

String sendData(String command, const int timeout, boolean debug)
{
String response = “”;

esp8266.print(command); // send the read character to the esp8266

long int time = millis();

while( (time+timeout) > millis())
{
while(esp8266.available())
{

// The esp has data so display its output to the serial window
char c = esp8266.read(); // read the next character.
response+=c;
}
}
/*
if(debug)
{
Serial.print(response);
}
*/
return response;
}