Skip to content

Environment Setup

1.Windows System

1.1. Download and install the Arduino software:

(1) First, go to the Arduino official website: https://www.arduino.cc/, and click "SOFTWARE" to enter the download page, as shown below:

(2) Then, choose and download the corresponding installer according to your operating system. If you are a Windows user, please choose to install the 2.0.3 version of Arduino IDE. Clicking "Windows Win10 and newer,64bits" or "Windows MSI installer" downloads an installation file (.exe) that requires manual installation; clicking "Windows ZIP file" directly downloads the 2.0.3 version of Arduino IDE as a compressed file, which can be used directly after extraction without installation.

Click the DOWNLOAD icon to directly install Arduino IDE. Please note: the version we used when writing this document is the 2.x version. If a newer version of Arduino IDE is available when you download it, please download the latest version.

(3) After the Arduino software is downloaded, if you downloaded the (.exe) file "arduino-ide_x.x.x_Windows_64bit.exe" by clicking "Windows Win10 and newer,64bits" or "Windows MSI installer", you need to double-click the (.exe) file to continue the installation. When you receive a warning from the operating system, please click "Allow access" to allow the driver to install. First click "I Agree", then select "Anyone who uses this computer(all users)" and click Next.

(4) After clicking "Next", if the following page appears again, click "I Agree".

(5) Select the installation directory (we recommend keeping the default directory), then click "Install".

(6) If the following interface appears, select "Install".

This process will extract and install all the required files to run the Arduino software (IDE) correctly.

(7) After installation is complete, an Arduino IDE software shortcut will be created on the desktop.

1.2. Install the driver on the Windows system:

(Note: if the computer already has the driver installed, you do not need to install it again; otherwise, you need to perform the following steps.) Before using the ESP32 main board, the driver must be installed, otherwise the ESP32 main board cannot communicate with the computer. Connect the main control board to the computer with a USB cable. Generally, computers with macOS and Windows 10 will install the driver automatically. If it is not installed automatically, you need to install the driver manually.

(1)Check whether the computer has installed the driver automatically:

Click "Computer"--"Properties"--"Device Manager". The following display indicates a successful installation:

(2)If it is not installed automatically, install it manually. The steps are as follows:

We provide the serial driver in the downloaded materials.

Driver download for Windows 10 and above: Windows driver, click to download

Driver download for Windows 7: Windows 7 driver, click to download

Right-click "USB Serial", select "Update driver (P)" and click it.

Jump to the following page, select "Browse my computer for driver software (R)" and click it.

We also provide the driver files for the CP210X series chip in the corresponding folder, located as follows:

You can first copy the driver file to the computer desktop, then click "Browse (R)...", select the CP210X series chip driver, and finally click "Next".

After a while, the driver installation is successful.

At this time, open the computer's Device Manager again, and you can see that the CP2102 driver has been installed successfully, and the yellow exclamation mark that was just there is gone.

1.3. Introduction to the Arduino IDE toolbar:

Click the icon on the desktop to open Arduino IDE.

-- Used to check whether there are any compilation errors.

-- Used to upload the program to the Arduino board.

-- Used for single-step debugging when writing programs.

-- The serial monitor used to receive serial data from the board and send serial data to the board.

-- Used to convert the data received by the serial port into a dynamic curve graph.

-- Used to open recently saved example sketches.

-- Used to manually install the development board.

Language switching function:

(1)Click "File" → "Preferences", switch the language from "English" to "简体中文 (Simplified Chinese)" on the Preferences page, and click "OK".

1.4. Install ESP32 on Arduino IDE:

We have already learned how to download Arduino IDE and install the driver. Next, we need to install ESP32 on Arduino IDE. Please perform the following steps:

(1) Click the icon on the desktop to open Arduino IDE.

(2) Click "File" → "Preferences", as shown below:

(3) Open the button marked in the following figure.

(4) Take this address:

https://jihulab.com/esp-mirror/espressif/arduino-esp32/-/raw/gh-pages/package_esp32_index_cn.json

Copy and paste it in, then click "OK" to save this address, as shown below:

(5) Click "OK" again.

(6)First click "Tools"→"Board:", then click "Boards Manager..." to enter the "Boards Manager" page, type "esp32" in the text box, select version 2.xcn or 3.xcn to install, and click "Install" to start installing the related installation package. As shown below: (Special reminder: choose the domestic version ending with cn, otherwise you may not be able to access the foreign servers.)

Select the installation package ending with cn

If it still cannot be installed, you can choose to download the offline installation package, close Arduino IDE and install it directly, then open Arduino IDE again and it will already be installed.

ESP32 development board offline installation package: Baidu Netdisk download

(7)Click "Tools"→"Board:", and you can see the installed ESP32 Arduino. You can view various ESP32 development board models inside, and select the corresponding ESP32 development board model.

(8)After setting the board type, select the correct COM port (you can see the corresponding COM port after the driver is installed successfully). The settings are as shown below.

2.Mac System

2.1. Download and install Arduino IDE:

Go to the Arduino official website: https://www.arduino.cc/, and click "SOFTWARE" to enter the download page, as shown below:

2.2. How to install the CP2102 driver:

(Note: if the driver is already installed, you do not need to install it again; otherwise, you need to perform the following steps.)

(1)Use a USB cable to connect the ESP32 main board to your macOS computer, and open Arduino IDE.

(2)CP2102 driver download link: https://cn.silabs.com/developers/usb-to-uart-bridge-vcp-drivers?tab=downloads

(3)Click to download the macOS version.

(4)Extract the downloaded compressed package.

(5)Open the folder and double-click the "SiLabsUSBDriverDisk.dmg" file.

You can see the following files.

(6)Double-click "Install CP210x VCP Driver", check "Don't warn me when opening application on this disk image" and click "Open".

(7)Click "Continue".

(8)First click "Agree", then click "Continue".

(9)Continue to click "Continue", then enter your user password.

(10)Select "Open Security Preferences".

(11)Click the security lock and enter your user password to authorize.

(12)You can see the lock is opened, click "Allow".

(13)Return to the installation interface and wait for the installation to complete as prompted.

(14)Installation successful.

2.3. Install ESP32 on Arduino IDE:

We have already learned how to download Arduino IDE and install the driver. Next, we need to install ESP32 on Arduino IDE. Please perform the following steps:

(1) Click the icon on the desktop to open Arduino IDE. Click "Arduino IDE" → "Preferences", as shown below:

(2) Open the button marked in the following figure.

(3) Take this address: https://jihulab.com/esp-mirror/espressif/arduino-esp32/-/raw/gh-pages/package_esp32_index_cn.json , copy and paste it in, then click "OK" to save this address, as shown below:

(4) Click "OK" again.

(5)First click "Tools"→"Board:", then click "Boards Manager..." to enter the "Boards Manager" page, type "esp32" in the text box, select version 2.x-cn or 3.x-cn to install. The installation package is not large. Click "Install" to start installing the related installation package. As shown below: (Special reminder: choose the domestic version ending with cn, otherwise you may not be able to access the foreign servers.)

(6)Click "Tools"→"Board:", and you can see the installed ESP32 Arduino. You can view various ESP32 development board models inside, and select the corresponding ESP32 development board model.

(7)After setting the board type, select the correct COM port (you can see the corresponding COM port after the driver is installed successfully). The settings are as shown below.

3.Add the Arduino library files

Special reminder: the library files are provided in the Materials Download section above. Please download and install the library files.

The path of the Arduino library files we provide: ..\library-files\arduino-c-windows. As shown below:

3.1. How to add library files on the Windows system:

(1)Open Arduino IDE , and on the Arduino IDE interface click "Project"→"Include Library"→"Add .ZIP Library...".

(2)Find the location where the library files are stored, select the corresponding library file, and click "Open" to add it. The library files can only be added one at a time.(Note: the library file needs to be compressed into .ZIP format; here "LCD_128X32.ZIP" is used as a demonstration, and the method for adding other library files is the same.)

3.2. How to add library files on the macOS system:

(1)On the Arduino IDE interface, select "Project" > "Include Library" > "Add .ZIP Library...".

(2)Find the location where the library files are stored, select the corresponding library file, and click "Open" to add it. The library files can only be added one at a time.(Here, adding the "LCD_128X32.ZIP" library file is used as an example, and the method for adding other library files is the same.), as shown below:

At this point, the installation should normally be successful.