Arduino IDE Getting Started Tutorial

The Arduino IDE is an open-source programming tool officially provided by Arduino, supporting C/C++ development.

It provides users with simple and intuitive code writing, compiling, and uploading functions, making it easy to burn programs to development boards such as Arduino and ESP32.

The IDE includes extensive built-in example code and supports library file extensions, allowing developers to quickly access drivers for various sensors and modules, enabling a rich set of hardware interaction features.

With its cross-platform support (Windows, macOS, and Linux), the Arduino IDE is widely used in education, makerspaces, and IoT development, making it an essential tool for both beginners and advanced embedded development learners.


1.Install Arduino IDE

This section will guide you through installing the Arduino IDE on Windows, macOS, and Linux systems.

Install Arduino IDE on Windows

  1. Visit the official Arduino website and go to the software download page: Arduino IDE Download

    Arduino IDE official website
  2. Select the version that matches your computer configuration, then click the Download button to begin.

Note

  • The Arduino IDE is updated frequently. To ensure compatibility, it is recommended to download the latest official version.

  1. Run the installer by double-clicking the downloaded arduino-ide_xxxx.exe file.

  2. Read and accept the License Agreement.

    License Agreement window
  3. Select the desired installation options.

    Installation options
  4. Choose the installation path. It is recommended to install the software on a non-system drive.

    Installation path
  5. Click Install and wait for the process to complete. Finally, click Finish.

    Installation finished

Install Arduino IDE on MacOS

  1. Double-click the downloaded arduino-ide_xxxx.dmg file.

  2. Drag and drop Arduino IDE.app into the Applications folder.

  3. After a few seconds, you will see Arduino IDE installed successfully.

    Arduino IDE installation on macOS

Install Arduino IDE on Linux

For Linux users, please follow the official tutorial for Arduino IDE 2.0 installation: Linux Installation Guide


Open the Arduino IDE

When you open Arduino IDE for the first time:

  • The software will automatically install the Arduino AVR Boards, built-in libraries, and other required files.

    First startup window
  • During installation, your firewall or security center may ask for permission to install drivers. Please allow all requests.

    Driver installation prompt

Note

  • If some installations fail due to network issues, simply reopen the Arduino IDE and it will continue the remaining installation steps.

  • The Output Window will not appear automatically after setup. It will only open when you click Verify or Upload.


2.Install CH340 Driver

The ESP32 development board in this kit uses the CH340C USB-to-serial chip, so you must install the corresponding driver before using it.

If you connect the board to the computer without installing the driver, the device will not be recognized correctly, and you may see the following interface in the Device Manager:

CH340 not recognized in Device Manager

Download the Driver

  1. Visit the official website of the CH340 Driver: CH340 Driver

  2. Select the version that matches your computer system.(This tutorial uses Windows 11 as an example).

_images/10.CH340.png
  1. Select the first Windows version, go to the download page, and click the Download button.

_images/11.CH340.png
  1. Alternatively, you can download the prepared installation package directly: CH340 Installation Package (Windows)


Install the Driver

  1. After downloading, open the driver file and click Install.

_images/13.CH340.png
  1. When the installation is successful, you will see the following confirmation message:

_images/14.CH340.png

Note

In some cases, you may need to restart Windows after installation to ensure the driver takes effect.


Checking Correct Driver Installation in Device Manager

Once the driver is installed, connect the ESP32 board to your computer.

You should see the correct name and port number appear in the Device Manager (for example: COM28).

_images/15.CH340.png

Checking Correct Driver Installation in Arduino IDE

  1. Open the Arduino IDE.

  2. Go to Tools → Port and select the COMx port that matches the one you saw in Device Manager.

_images/16.CH340.png

Note

If the Arduino CH340 device does not appear in Device Manager or the Arduino IDE: - Uninstall the driver, restart your computer, then reinstall it.

_images/17.CH340.png
  • Try a different USB port or another computer.

  • Ensure you are using a USB cable that supports data transfer (not just charging).


3.Install ESP32 Core Board

Add Additional Boards Manager URL

  1. Open the Arduino IDE, click File → Preferences in the upper left corner, and copy and paste the following address into the Additional Board Manager URLs input box.

  2. After entering the URL, click OK.

https://espressif.github.io/arduino-esp32/package_esp32_index_cn.json
_images/18.URL.png
_images/19.URL.png
_images/20.URL.png

Precaution

  • After completing this step, you need to close and reopen the Arduino IDE.


Download the ESP32 Core Package

  1. Open the Arduino IDE, click the second icon on the left to open the BOARDS MANAGER page.

    _images/21.ESP32_CORE.png
  1. Enter ESP32 in the search box and press Enter.

  2. Find the core package titled esp32 by Espressif Systems, select version 3.2.0 from the drop-down menu, and click Install to download and install it.

_images/22.ESP32_CORE.png
  1. Please wait for the download progress bar in the lower right corner to complete.

_images/23.ESP32_CORE.png
  1. When the download is complete, the message Successfully installed platform esp32:3.2.0 will be displayed.

_images/24.ESP32_CORE.png

6. Check if the installation is successful: Click Tools → Board → esp32 to check whether an ESP32 development board is available for selection.

_images/25.ESP32_CORE.png

Precaution

  • We recommend installing ESP32 Core Package version 3.2.0, or using version 3.0 or later.

  • Older versions may be incompatible with the libraries used in this tutorial, causing program errors.

  • If you have an earlier version installed, uninstall it and then reinstall version 3.2.0 of the ESP32 Core Package.


4.Add Libraries

  • Arduino libraries can significantly simplify the development process.

  • They encapsulate commonly used functions and hardware driver code, allowing users to simply call ready-made functions without writing complex low-level code from scratch.

  • For example, the LiquidCrystal_I2C library allows users to drive an LCD1602 display with just a few lines of code.

  • A wealth of community-provided third-party libraries also allows for quick integration with various sensors and modules.

  • These library functions make it easy to interact with hardware and expand Arduino’s functionality.


Download Libraries

  1. We’ve compiled all the libraries necessary to run this suite. Please click the link below to download them and follow the instructions to complete the installation: Download libraries

  2. Unzip the downloaded library file. The library file storage path is Code and LibrariesLibraries . Open it and confirm that it contains the library file shown in the figure below.

_images/26.lib2.png

Import Libraries

  1. Open the Arduino IDE and click Sketch → Include Library → Add .ZIP Library.

_images/27.lib.png
  1. In the pop-up window, locate the folder of the library you just downloaded and unzipped, select it, and click Open to complete the import.

_images/28.lib2.png
  1. If the library file is imported successfully, the Arduino IDE output window will display the message: Library installed.

_images/31.lib.png

Precaution

  • Arduino IDE does not support importing multiple libraries at once; you must import one library at a time.

  • If a library file already exists, a prompt will appear asking whether to overwrite it. It is recommended to confirm overwrite to avoid program errors caused by different library versions.

_images/29.lib.png
  1. Verify that the library was imported successfully: Click Sketch → Include Library, scroll down to Contributed Libraries, and check whether the library files we provided are listed.

    _images/30.lib.png

Download Libraries Using Arduino IDE

You can also download required libraries directly using the Arduino IDE.

  1. On the right side of the Arduino IDE interface, click the Library Manager icon.

  2. Enter keywords in the search box to find the required library and click Install to download.

_images/32.lib.png