Node MCU Wifi connection problem I'm trying to connect my nodeMCU to my WiFi network also i have provided ip address  but it keeps printing ........ it is not connecting to the network. Below is my code.
#include &lt;ESP8266WiFi.h&gt;
#include &lt;ESP8266WebServer.h&gt;

// Configration Parameter for Access Poin
char * ssid_ap = &quot;&quot;; 
char * password_ap = &quot;&quot;;
IPAddress ip(192, 168, 1, 158); 
IPAddress gateway(192, 168, 1, 1);
IPAddress subnet(255,255,255,0);

// Set up the server object
ESP8266WebServer server (80);

// Keep track of sensor data that's going to be sent by the client
float sensor_value = 0.0;

void setup() 
{
  WiFi.mode(WIFI_AP);
  WiFi.softAPConfig(ip,gateway,subnet);
  WiFi.softAP(ssid_ap,password_ap);

  Serial.begin(115200);
  delay(10);
  Serial.println();
  Serial.println();
  Serial.print(&quot;Connecting to &quot;);
  Serial.println(ssid_ap);

  while (WiFi.status() != WL_CONNECTED) 
  {
    delay(500);
    Serial.print(&quot;.&quot;);
  }

  Serial.println(&quot;&quot;);
  Serial.println(&quot;WiFi connected&quot;);
 
  server.begin();
  Serial.println(&quot;Server started&quot;);
  Serial.print(&quot;IP Address:&quot;); 
  // Serial.print(WiFi.localIP());
  // Configure Server Router
  server.on(&quot;/&quot;,handleIndex); // use the top root path to report the last sensor value
  server.on(&quot;/update&quot;,handleUpdate);
  // server.begin();
}

void loop() {
  // put your main code here, to run repeatedly:

}

void handleIndex()
{
  server.send(200,&quot;text/plain&quot;,String(sensor_value)); //we'll need to refresh the page for getting the latest value
 
}

void handleUpdate()
{
 sensor_value = server.arg(&quot;value&quot;).toFloat(); 
 Serial.println(sensor_value);
 server.send(200,&quot;text/plain&quot;,&quot;Updated&quot;);
  
}
You are creating a SoftAP (in essence creating a separate Wifi network). In this configuration, the ESP8266 will not &quot;connect&quot; to anything so polling WiFi.Status for the WL_CONNECTED status is meaningless.
To see if the SoftAP instance was created successfully, you should look at the output of WiFi.SoftAP() when you create the SoftAP instance, which returns a boolean indicating success (true) or failure. Or you should see the SSID of your newly created access point appearing on your PC or phone.
I suggest you look at the ESP8266 examples included in the Arduino IDE when you install device support for the ESP8266 to get some ideas about what you can do with a SoftAP.