title: ESP8266 with ESP12E web ip address not responding
body: <p>I have a program to control an RC car. The code compiles and uploads fine. It also prints out the ip address in the serial monitor. When i type the ip address into my browser i get an error that says the ip address can not be reached. Below is my code. </p>
  
  <p>Thank you </p>
  
  <p>Alex </p>
  
  <pre><code> #include &lt;ESP8266WiFi.h&gt;
   #include &lt;WiFiClient.h&gt;
   #include &lt;ESP8266WebServer.h&gt;
   #include &lt;ESP8266mDNS.h&gt;
  </code></pre>
  
  <p>// Define variables with the pin values</p>
  
  <pre><code> const int DRIVE_MOTOR_POWER = D2;
   const int DRIVE_MOTOR_DIRECTION = D4;
   const int STEER_MOTOR_POWER = D1;
   const int STEER_MOTOR_DIRECTION = D3;
  </code></pre>
  
  <p>// drivePower sets how fast the car goes
  // Can be set between 0 and 1023 (although car problaly wont move if values are too low)</p>
  
  <pre><code> int drivePower = 1023;
  </code></pre>
  
  <p>// driveDirection sets what direction the car drives
  // If the car is moving backwards when you press the forward button, change this to LOW</p>
  
  <pre><code> uint8_t driveDirection = HIGH;
  </code></pre>
  
  <p>// steeringPower sets how fast the car turns
  // Can be set between 0 and 1023 (again, car probably won't steer if the value is too low)</p>
  
  <pre><code> int steeringPower = 1023;
  </code></pre>
  
  <p>// steerDirection sets what direction the car steers
  // If the car is steering right when you press the left button, change this to LOW</p>
  
  <pre><code> uint8_t steerDirection = HIGH;
  
   const char* ssid = "wifi_username";
   const char* password = "wifi_password";
  
   ESP8266WebServer server(80);
  
   void handleRoot() {
  
    server.send(200, "text/plain", String("Hello from esp8266!"));
   }
  
   void handleNotFound(){
     String message = "File Not Found\n\n";
     message += "URI: ";
     message += server.uri();
     message += "\nMethod: ";
     message += (server.method() == HTTP_GET)?"GET":"POST";
     message += "\nArguments: ";
     message += server.args();
     message += "\n";
     for (uint8_t i=0; i&lt;server.args(); i++){
       message += " " + server.argName(i) + ": " + server.arg(i) + "\n";
     }
     server.send(404, "text/plain", message);
   }
  
   void setup(void){
  
     pinMode(DRIVE_MOTOR_POWER, OUTPUT);     
     pinMode(DRIVE_MOTOR_DIRECTION, OUTPUT);
     pinMode(STEER_MOTOR_POWER, OUTPUT);
     pinMode(STEER_MOTOR_DIRECTION, OUTPUT);
  
     Serial.begin(115200);
     WiFi.begin(ssid, password);
     Serial.println("");
  </code></pre>
  
  <p>// Wait for connection</p>
  
  <pre><code>   while (WiFi.status() != WL_CONNECTED) {
       delay(500);
       Serial.print(".");
     }
     Serial.println("");
     Serial.print("Connected to ");
     Serial.println(ssid);
     Serial.print("IP address: ");
     Serial.println(WiFi.localIP());
  
     server.on("/", handleRoot);
  
     server.on("/forward", [](){
       Serial.println("forward");
       analogWrite(DRIVE_MOTOR_POWER, drivePower);
       digitalWrite(DRIVE_MOTOR_DIRECTION, driveDirection);
       server.send(200, "text/plain", "forward");
     });
  
     server.on("/driveStop", [](){
       Serial.println("driveStop");
       analogWrite(DRIVE_MOTOR_POWER, 0);
       server.send(200, "text/plain", "driveStop");
     });
  
     server.on("/back", [](){
       Serial.println("back");
       analogWrite(DRIVE_MOTOR_POWER, drivePower);
       digitalWrite(DRIVE_MOTOR_DIRECTION, !driveDirection);
       server.send(200, "text/plain", "back");
     });
  
     server.on("/right", [](){
       Serial.println("right");
       analogWrite(STEER_MOTOR_POWER, steeringPower);
       digitalWrite(STEER_MOTOR_DIRECTION, steerDirection);
       server.send(200, "text/plain", "right");
     });
  
     server.on("/left", [](){
       Serial.println("left");
       analogWrite(STEER_MOTOR_POWER, steeringPower);
       digitalWrite(STEER_MOTOR_DIRECTION, !steerDirection);
       server.send(200, "text/plain", "left");
     });
  
     server.on("/steerStop", [](){
       Serial.println("steerStop");
       analogWrite(STEER_MOTOR_POWER, 0);
       server.send(200, "text/plain", "steerStop");
     });
  
     server.onNotFound(handleNotFound);
  
     server.begin();
     Serial.println("HTTP Server Started");
   }
  
   void loop(void){
     server.handleClient();
   }
  </code></pre>