Lesson01: Arduino IDE Environment Setup and Serial Port Self-Test¶
1. Objectives¶
This lesson verifies that the Arduino IDE, ESP32-S3 board package, Flash, OPI PSRAM, and partition scheme are configured correctly. All subsequent lessons depend on this environment configuration, so this lesson is not a peripheral experiment but a foundational self-test for the entire course.
2. Requirements¶
- Arduino IDE 2.3.6. (If compilation fails with another version, use 2.3.6.)
- ESP32 by Espressif Systems 3.3.3.
- Select
ESP32S3 Dev Moduleas the board. - Set Flash Size to
16MB (128Mb). - Set PSRAM to
OPI PSRAM. - Set Partition Scheme to
Huge APP (3MB No OTA/1MB SPIFFS). - No third-party Arduino libraries are required for this lesson.
How to add library files:
- No additional third-party libraries are required for this lesson. You only need Arduino IDE 2.3.6 and ESP32 by Espressif Systems 3.3.3.
3. How to Add the ESP32 3.3.3 Board Package¶
-
Add the Espressif ESP32 board index URL under
Additional boards manager URLs:https://espressif.github.io/arduino-esp32/package_esp32_index.json.
-
Select
esp32 by Espressif Systems, choose version3.3.3, and click Install.
-
After installation is complete, go to
Tools > Board > esp32and selectESP32S3 Dev Module.
4. Arduino IDE Instructions¶
-
In the
Toolsmenu, confirm that the selected board isESP32S3 Dev Module.
-
Select the appropriate serial port, click Verify to compile, and then click Upload to flash the program. (Remember to connect the hardware and select the corresponding COM port.)

5. Hardware Instructions¶
- Connect the development board to the computer using a USB data cable and confirm that the computer recognizes the corresponding serial port.
-
No additional peripherals need to be connected, and there is no need to operate the screen or buttons.
-
If there is no serial output, first check whether the USB cable supports data transfer, and then verify that the correct port is selected in the Arduino IDE.
6. Key Code Explanation¶
constexpr uint32_t kExpectedFlashBytes = 16UL * 1024UL * 1024UL;
const uint32_t flashBytes = ESP.getFlashChipSize();
const uint32_t psramBytes = ESP.getPsramSize();
const bool flashMatches = flashBytes == kExpectedFlashBytes;
const bool psramReady = psramFound();
This code converts 16MB of Flash into bytes and then reads the Flash and PSRAM capacities detected by the current board package. flashMatches checks whether the correct Flash Size is selected in the Arduino IDE menu, while psramReady checks whether OPI PSRAM is actually enabled. This verifies the runtime results and is more reliable than simply checking the menu settings.
esp_chip_info_t chipInfo = {};
esp_chip_info(&chipInfo);
Serial.printf("CPU cores: %u\n", static_cast<unsigned int>(chipInfo.cores));
esp_chip_info_t is a chip information structure provided by ESP-IDF. The code first creates and zero-initializes the structure, then calls esp_chip_info() to populate it, and finally prints the number of CPU cores. This code helps students understand that Arduino-ESP32 can directly access the underlying capabilities of ESP-IDF.






