Error compiling DOIT ESP32 DEVKIT V1

Hi all, I am following this link:
https://randomnerdtutorials.com/installing-the-esp32-board-in-arduino-ide-windows-instructions/

In order to learn IoT but I got this error:

fork/exec cmd.com: The system cannot find the file.
Error compiling for board DOIT ESP32 DEVKIT V1.

Can somebody help me with this? I couldn't find any solution

Please post the code you used copied from the IDE, using code tags when you post it

I used WiFiScan example code.

/*
 *  This sketch demonstrates how to scan WiFi networks.
 *  The API is almost the same as with the WiFi Shield library,
 *  the most obvious difference being the different file you need to include:
 */
#include "WiFi.h"

void setup()
{
    Serial.begin(115200);

    // Set WiFi to station mode and disconnect from an AP if it was previously connected
    WiFi.mode(WIFI_STA);
    WiFi.disconnect();
    delay(100);

    Serial.println("Setup done");
}

void loop()
{
    Serial.println("scan start");

    // WiFi.scanNetworks will return the number of networks found
    int n = WiFi.scanNetworks();
    Serial.println("scan done");
    if (n == 0) {
        Serial.println("no networks found");
    } else {
        Serial.print(n);
        Serial.println(" networks found");
        for (int i = 0; i < n; ++i) {
            // Print SSID and RSSI for each network found
            Serial.print(i + 1);
            Serial.print(": ");
            Serial.print(WiFi.SSID(i));
            Serial.print(" (");
            Serial.print(WiFi.RSSI(i));
            Serial.print(")");
            Serial.println((WiFi.encryptionType(i) == WIFI_AUTH_OPEN)?" ":"*");
            delay(10);
        }
    }
    Serial.println("");

    // Wait a bit before scanning again
    delay(5000);
}

I solved it uninstalling 1.0.6 version and installing only 1.0.0 version of ESP32 board from board manager.

Many thanks

Why not the latest? V2.0.2

I don't know.
That version is not available on my manage board.
And I tried with v1.0.5/4/3 and it didn't work. It only works with v1.0.0 version

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.