Here is Step by Step Guide to Setup on How to Setup ESP32 NodeMCU with Arduino IDE on Windows 10 PC. In our previous article, we recomanded ESP WROOM 32 dev board over Adafruit Feather as cost effective option. In this guide, we will help to setup ESP WROOM 32 dev board with Arduino IDE. We are using clone of DOIT ESP-WROOM-32 Devkit V1 and for the most boards, these are “ESP32 Dev Module” to Arduino IDE.
First, you will attach the to Windows 10 PC with any USB data cable (used with almost any Android Smartphone of these days). Open Device Manager and expand the COM. In the below webpages, you’ll get the resources for installing the USB driver for the board :
1 2 | https://docs.espressif.com/projects/esp-idf/en/latest/get-started/establish-serial-connection.html https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers |
The above steps are required to make sure that the board you got is not a faulty board. You may omit the above steps but omit may invite random trial and error. The board we are using looks like the below photo (except, it lacks DO IT logo on backside) :
---
How To Setup ESP32 NodeMCU With Arduino IDE
Turn off any real-time anti-virus software. The packages we will install will fail to compile sketch from Arduino IDE with running real-time anti-virus software. You should remember it for everytime working with this dev board. Else you’ll get peculiar core/core/a
copying error on Arduino IDE. Real-time anti-virus software probably lock some files & provoke the error.
You need Git for Windows to be installed. We have guides on how to setup Git on Windows 10 PC. We expect that the reader already have Ubuntu Bash configured for Windows 10 PC like our guide.
The above configaration on Windows 10 may take time but the PC can be easily handled like UNIX/Linux for dev works.
What exactly we need is cloning this repo inside Arduino’s one specific directory :
1 | https://github.com/espressif/arduino-esp32 |
Arduino IDE commonly get installed in this path :
1 | C:\Users\<username>\Documents\Arduino |
For me, it is :
1 | C:\Users\abhishekghosh\Documents\Arduino |
Open Git Bash command line tool there from right click context menu or change directory to that path :
1 | cd ~/Documents/Arduino |
Make directory structure and change directory like we have shown below :
1 2 3 | cd ~/Documents/Arduino mkdir -p hardware/espressif cd hardware/espressif |
Now, clone that repo inside a directory named esp32
so that the path becomes ~/Documents/Arduino/hardware/espressif/esp32
:
1 2 | cd ~/Documents/Arduino/hardware/espressif git clone https://github.com/espressif/arduino-esp32.git esp32 |
It will take a while. It is around 200 mb download. After download is complete, change directory to esp32
:
1 2 | cd esp32 ls -al |
Run an update to download some third party repositories inside the current repo :
1 | git submodule update --init --recursive |
You will notice :
1 | https://github.com/espressif/arduino-esp32/tree/master/libraries |
AzureIoT and BLE has third party repo. Unless you do the above steps, you’ll face compilation error with AzureIoT and BLE on Arduino IDE.
Next, open the following location on Windows Explorer :
1 | C:\Users\<username>\Documents\Arduino\hardware\espressif\esp32\tools |
You’ll notice an application named get
inside that Arduino\hardware\espressif\esp32\tools
directory. Double click to run it. It will open a command line window and download the required tools for compilation on Arduino IDE. It will do the job and automatically will get closed. Unless you do these steps, you’ll get core/core/a
copying error on Arduino IDE. In case this step is not completed, double click to run the get
application.
The above steps will complete installation of all the required software for ESP32 NodeMCU (ESP WROOM 32) dev board.
Now, open Arduino IDE. Connect the ESP32 NodeMCU (ESP WROOM 32) dev board. Do these changes :
Tools > Boards > ESP32 Dev Module
Tools > Flash Frequency > 40 MHz
Tools > Upload Speed > 115200
Tools > Port > (select the active COM port ESP32 NodeMCU (ESP WROOM 32) dev board is attached)
Now, to test, load from example :
File > Examples > WiFi > Wifi Scan
Which is like this :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | #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(500); } |
Switch on some WiFi devices, hotspots. Open Arduino serial monitor (Tools > Serial Monitor). You’ll get WiFi scan result on Arduino serial monitor like I got :
1 2 3 4 5 6 7 8 9 10 11 | Setup done scan start scan done 3 networks found 1: DIRECT-HnDESKTOP-J81L8BRmskL (-49)* 2: SamsungGalaxy (-63)* 3: amartya (-86)* scan start scan done ... |
The above sketch proves that the setup and board is correct.
Tagged With esp wroom 32 arduino , esp32 arduino , nodemcu esp32 arduino , esp32 wroom arduino ide installation , nodemcu 32s in arduino ide , esp32 nodemcu , esp wroom 32 , arduino esp wroom32 , esp32 arduino usb driver , esp32 arduino setup