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.

Code: Untitled.cpp Select all


#include "WiFi.h"
#include <ESPmDNS.h>
#include <ESPAsyncWebServer.h>

AsyncWebServer server(80); // server port 80

void notFound(AsyncWebServerRequest *request)
{
request->send(404, "text/plain", "ERROR 69: PAGE NOT FOUND");
}

void setup(void)
{

Serial.begin(115200);

WiFi.softAP("Gekke test wifi", "wachtwoord"); // Difine SSID en paswoord
Serial.println("softap");
Serial.println("");
Serial.println(WiFi.softAPIP());


if (MDNS.begin("Pim")) { // om Pim.local/ in te kunnen geven in de browster
Serial.println("MDNS responder started");
}



server.on("/", [](AsyncWebServerRequest * request)
{
String message = "Hi welkom op mijn site hehe ;))";
request->send(200, "text/plain", message);
});

server.on("/Test", HTTP_GET, [](AsyncWebServerRequest * request)
{
String message = "Meehhhhhh deze ding is vies geheim, nie kijke blo!";
request->send(200, "text/plain", message);
});

server.onNotFound(notFound);

server.begin(); // it will start webserver
}


void loop(void)
{

The error message:

Code: Untitled.txt Select all


Arduino: 1.8.12 (Windows 10), Board:"DOIT ESP32 DEVKIT V1, 80MHz, 921600, None"

Meerdere bibliotheken gevonden voor "WiFi.h"
In file included from C:\Users\Manna\OneDrive\Documents\Arduino\test_wifi_server\test_wifi_server.ino:3:0:

Gebruikt: C:\Users\Manna\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\libraries\WiFi
Niet gebruikt: C:\Program Files (x86)\Arduino\libraries\WiFi
C:\Users\Manna\OneDrive\Documents\Arduino\libraries\ESPAsyncWebServer-master\src/ESPAsyncWebServer.h:33:22: fatal error: AsyncTCP.h: No such file or directory

compilation terminated.

exit status 1
Fout bij het compileren voor board DOIT ESP32 DEVKIT V1

Dit rapport zou meer informatie bevatten met
"Uitgebreide uitvoer weergeven tijden compilatie"
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: 1131
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: Bytespider, ChatGPT-User, Google [Bot], YisouSpider and 11 guests