Environment Setup
1. Windows System¶
1.1. Download and Install the Arduino Software:
(1) First, go to the official Arduino 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" means downloading an installation file (.exe), which requires manual installation; clicking "Windows ZIP file" means directly downloading the 2.0.3 version of Arduino IDE, which is a compressed file that can be unzipped and used directly without installation.

Click the DOWNLOAD icon to install the Arduino IDE directly. Please note: when we wrote this document, the version was 2.x. 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 installation. 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, you should select "Install".

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

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


1.2. Install the Driver on a Windows System:
(Note: If the driver is already installed on the computer, you do not need to install it again; if not, you need to perform the following operations.) Before using the ESP32 board, the driver must be installed; otherwise the ESP32 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 cannot be installed automatically, you need to install the driver manually.
(1)Check whether the computer has automatically installed the driver:
Click "Computer" -- "Properties" -- "Device Manager". If the following is displayed, the installation was successful:

(2)If it cannot be installed automatically, install it manually with the following steps:
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.

Go to the following page, select "Browse my computer for drivers (R)" and click it.

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

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

After a while, the driver installation is successful.

Now 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 there before is gone.

1.3. Introduction to the Arduino IDE Toolbar:
Click the icon on the computer desktop
to open the 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 received serial data into a dynamic curve graph.
-- Used to open the most recently saved example sketch.
-- Used to manually install a board.
Language switching function:
(1)Click "File" → "Preferences", and on the Preferences page change the language from "English" to "简体中文", then click "OK".



1.4. Install ESP32 on the Arduino IDE:
We have learned above how to download the Arduino IDE and how to install the driver. Now we need to install ESP32 on the Arduino IDE. Please perform the following steps:
(1) Click the icon on the computer desktop
to open the Arduino IDE.

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

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

(4) Copy this address:
https://jihulab.com/esp-mirror/espressif/arduino-esp32/-/raw/gh-pages/package_esp32_index_cn.json
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, enter "esp32" in the text box, select the 2.xcn or 3.xcn version to install, and click "Install" to begin installing the relevant installation package. As shown below: (Special reminder: choose the domestic version ending with "cn", otherwise you may not be able to access the overseas servers.)

Select the installation package ending with "cn".

If it still cannot be installed, you can choose to download the offline installation package, close the Arduino IDE and install it directly, then reopen the Arduino IDE and it will already be installed.
ESP32 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 boards of different models and select the corresponding ESP32 development board model.


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



2. Mac System¶

2.1. Download and Install the Arduino IDE:
Go to the official Arduino 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; if not, you need to perform the following operations.)
(1)Connect the ESP32 board to your MacOS computer with a USB cable and open the 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)Unzip 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)When the lock is opened, click "Allow".

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

(14)Installation successful.

2.3. Install ESP32 on the Arduino IDE:
We have learned above how to download the Arduino IDE and how to install the driver. Now we need to install ESP32 on the Arduino IDE. Please perform the following steps:
(1) Click the icon on the computer desktop
to open the Arduino IDE. Click "Arduino IDE" → "Preferences", as shown below:

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

(3) Copy this address: https://jihulab.com/esp-mirror/espressif/arduino-esp32/-/raw/gh-pages/package_esp32_index_cn.json , 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, enter "esp32" in the text box, select the 2.x-cn or 3.x-cn version to install (the installation package is small), and click "Install" to begin installing the relevant installation package. As shown below: (Special reminder: choose the domestic version ending with "cn", otherwise you may not be able to access the overseas servers.)



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

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

3. Add Arduino Library Files¶
Special reminder: the library files are provided in the material download section above. Please download and install the library files.
The path of the Arduino library files we provide is: ..\library-files\arduino-c-windows, as shown below:

3.1. How to Add Library Files on a Windows System:
(1)Open the Arduino IDE
, and in the Arduino IDE interface click "Sketch" → "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. Library files can only be added one by one.(Note: the library files need 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 MacOS System:
(1)In the Arduino IDE interface, select "Sketch" > "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. Library files can only be added one by one.(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.