Found multiple libraries for "WiFi.h"

PimPom
Posts: 1
Joined: Sat Feb 20, 2021 7:33 pm

Found multiple libraries for "WiFi.h"

Postby PimPom » Sat Feb 20, 2021 8:02 pm

Hi, I have been trying to upload programs to my ESP32 development board. Unfortunately I receive a error message saying Found multiple libraries for "WiFi.h", but if I use an example then it works. I've tried pasting my code in to the example (deleting all the code exept [ include "WiFi.h" ] but then it doesn't work again.

I've tried using the latest version of the arduino IDE (1.8.13) but then I can't upload anything at all to my ESP32. So I use the 1.8.12 version.
  1. #include "WiFi.h"
  2. #include <ESPmDNS.h>
  3. #include <ESPAsyncWebServer.h>
  4.  
  5. AsyncWebServer server(80); // server port 80
  6.  
  7. void notFound(AsyncWebServerRequest *request)
  8. {
  9.   request->send(404, "text/plain", "ERROR 69: PAGE NOT FOUND");
  10. }
  11.  
  12. void setup(void)
  13. {
  14.  
  15.   Serial.begin(115200);
  16.  
  17.   WiFi.softAP("Gekke test wifi", "wachtwoord"); // Difine SSID en paswoord
  18.   Serial.println("softap");
  19.   Serial.println("");
  20.   Serial.println(WiFi.softAPIP());
  21.  
  22.  
  23.   if (MDNS.begin("Pim")) { // om Pim.local/ in te kunnen geven in de browster
  24.     Serial.println("MDNS responder started");
  25.   }
  26.  
  27.  
  28.  
  29.   server.on("/", [](AsyncWebServerRequest * request)
  30.   {
  31.    String message = "Hi welkom op mijn site hehe ;))";
  32.   request->send(200, "text/plain", message);
  33.   });
  34.  
  35.    server.on("/Test", HTTP_GET, [](AsyncWebServerRequest * request)
  36.   {
  37.    String message = "Meehhhhhh deze ding is vies geheim, nie kijke blo!";
  38.   request->send(200, "text/plain", message);
  39.   });
  40.  
  41.   server.onNotFound(notFound);
  42.  
  43.   server.begin();  // it will start webserver
  44. }
  45.  
  46.  
  47. void loop(void)
  48. {

The error message:
  1. Arduino: 1.8.12 (Windows 10), Board:"DOIT ESP32 DEVKIT V1, 80MHz, 921600, None"
  2.  
  3. Meerdere bibliotheken gevonden voor "WiFi.h"
  4. In file included from C:\Users\Manna\OneDrive\Documents\Arduino\test_wifi_server\test_wifi_server.ino:3:0:
  5.  
  6. Gebruikt: C:\Users\Manna\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\WiFi
  7. Niet gebruikt: C:\Program Files (x86)\Arduino\libraries\WiFi
  8. C:\Users\Manna\OneDrive\Documents\Arduino\libraries\ESPAsyncWebServer-master\src/ESPAsyncWebServer.h:33:22: fatal error: AsyncTCP.h: No such file or directory
  9.  
  10. compilation terminated.
  11.  
  12. exit status 1
  13. Fout bij het compileren voor board DOIT ESP32 DEVKIT V1
  14.  
  15. Dit rapport zou meer informatie bevatten met
  16. "Uitgebreide uitvoer weergeven tijden compilatie"
  17. optie aan in Bestand -> Voorkeuren.
Thanks in advance
Pim

ArcHeRRed
Posts: 7
Joined: Tue Feb 23, 2021 4:49 pm

Re: Found multiple libraries for "WiFi.h"

Postby ArcHeRRed » Tue Feb 23, 2021 5:04 pm

This not corract

Code: Select all

void loop(void)
{
edit to

Code: Select all

void loop(void)
{

}

lbernstone
Posts: 828
Joined: Mon Jul 22, 2019 3:20 pm

Re: Found multiple libraries for "WiFi.h"

Postby lbernstone » Tue Feb 23, 2021 11:43 pm

The line that says "fatal error" is where your fatal error is located.
https://github.com/me-no-dev/AsyncTCP

Who is online

Users browsing this forum: Bing [Bot] and 93 guests