2

Im working with node mcu ESP 8266 and trying to make it a webserver but keep encountering this problem.

   #include<ESP8266WiFi.h>
    WiFiClient client;
    WiFiServer server(80);
    void setup() 
    {
    Serial.begin(9600);
    WiFi.begin("network","password");
    while(WiFi.status()!= WL_CONNECTED)
    {
      delay(200);
      Serial.print("...");
    }
    Serial.println("NodeMCu is connected");
    server.begin();
    }
    void loop() 
    {
    client = server.available();
    if(client==1)
    {
       String request= client.readStringUntil("\n");
      Serial.println(request);
    }
    }
    ```

I'm getting this error :error: invalid conversion from 'const char' to 'char' [-fpermissive] 24 | String request= client.readStringUntil("\n"); | ^~~~ | | | const char

0 Answers0