PlatformIO Community

Fatal error: ESP8266WiFi.h: No such file or directory Adafruit ESP32 Feather

Hi!

I am trying to include the ESP8266 library, but the compiler says it doesn’t find that file.

This is the plataformio.ini:

    [env]
    framework = arduino
    lib_ldf_mode = deep+
    lib_deps =  https://github.com/esp8266/Arduino
    [env:featheresp32]
    platform = espressif32
    board=featheresp32
    upload_port = COM[6]

And this is the code:

    #include <Arduino.h>
    #include <ESP8266WiFi.h>

    void setup() {
      Serial.begin(9600);
    }

    void loop() {
      delay(1000);
      Serial.println("Hello World!");
    }

Find the solution in this thread link

ESP32 boards don’t work with ESP8266WiFi.h, you have to use Wifi.h instead.