Recently i purchased an ESP32 module for a WiFi project I'm working on. Once I got it though, I realized two things; it takes unusually long to compile code, and it refuses to connect to WiFi. Here is my code:
#include <WiFi.h>
#include<HTTPClient.h>
const char* ssid = "CGSEN12AG";
const char* password = "ASDF123!!";
void setup() {
Serial.begin(115200);
delay(4000);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.println("Connecting to WiFi..");
}
Serial.println("Connected to the WiFi network");
}
void loop() {
}
I've tried adding Arduino15 to the exclusion list on my antivirus software, I've added https://dl.espressif.com/dl/package_esp32_index.json to the preferences' board managers urls, I've downloaded the drivers and the ESP32 libraries, and yet I still have to wait a few minutes for the code to compile and upload, and even if it does i get this message:
The selected serial port failed to execute script esptool
or
The program does upload but then shuts down