4.3_5.0_7.0inch_Lesson01_Timed_Serial_Output¶
1. Course Introduction¶
In this lesson, we use the Elecrow CrowPanel Advance 4.⅗.0/7.0 inch ESP32-S3 HMI development board to complete board configuration, compilation, flashing, and serial monitoring in the Arduino IDE. The program does not initialize the LCD or touchscreen; instead, it outputs Hello, World! and an incrementing counter value through the USB debug serial port approximately every 1 second, in order to verify the "computer—USB—development board—program—serial monitor" chain.
2. Learning Objectives¶
- Be able to explain the relationship that
setup()runs only once whileloop()runs continuously in a loop. - Be able to install Espressif ESP32 Arduino Core 3.3.8 and select
ESP32S3 Dev Module. - Be able to configure 16 MB Flash, the Huge APP partition, OPI PSRAM, and the actual device serial port.
- Be able to compile and flash the program and set the serial monitor to 9600 baud.
- Be able to determine whether the program is running normally based on text integrity, counter increment, and output period.
3. What You Need¶
- Hardware: One CrowPanel Advance 4.⅗.0/7.0 inch ESP32-S3 HMI development board.
- Cable: A USB data cable that supports data transfer.
- Software: Arduino IDE and the ESP32 Arduino development environment. Install Arduino IDE .
- Board package:
esp32 by Espressif Systems3.3.8. - Project:
Serial_port_printing.ino.
Code and Resource Download¶
Code download: - Serial_port_printing
4. Software Operation Steps¶
- Open the Arduino IDE and go to
File > Preferences. There is no mandatory requirement for the Arduino IDE version; however, version 2.x is recommended so that the interface matches this tutorial.
- In
Additional boards manager URLs, add the Espressif ESP32 board index address:
- Import the Arduino library files: Before running the sample program, first import the Arduino library files required by the project. Go to File → Preferences, check the Sketchbook location, and navigate to the libraries folder under that path.
Link to the two ways of importing third-party libraries in the Arduino IDE: https://www.elecrow.com/wiki/Arduino_IDE_Library_Import_Guide.html
- Open
Tools > Board > Boards Manager, search foresp32, and confirm thatesp32 by Espressif Systemsis installed. Version3.3.8is recommended; if the release environment standardizes on a different version, follow the release notes.
- Open
Environment_Setup.inowith the Arduino IDE.
-
After connecting the development board, select the newly appeared device serial port under Tools > Port.

-
Click Upload to compile and wait for the upload to complete. If it gets stuck at
Connecting..., check for port occupation and use the BOOT/RESET download mode as required by the board.
-
Open the Serial Monitor in the upper-right corner, set it to
9600baud, and observe the continuous output.
5. Hardware Operation Steps¶
- Connect the CrowPanel Advance 4.⅗.0/7.0 inch ESP32-S3 HMI development board to your computer using a USB cable that supports data transfer.
- After flashing is complete, press RESET and observe the serial monitor. It is normal that the LCD does not display
Hello, World!, because this lesson contains no LCD drawing code.
6. Key Code Explanation¶
7. Key Code Explanation¶
A global variable starts at 0 on reset and retains its value between loops. If you change it to 10, the first log line will start from 10; restore it to 0 after the experiment.
setup() runs only once; Serial.begin(9600) sets the debug serial port baud rate. The monitor must also be set to 9600; otherwise, garbled characters will appear.
The first two print() calls do not add a newline; println() outputs the number and ends the current line, so each loop iteration forms one complete log line. Changing println() to print() would cause multiple iterations of output to be concatenated onto a single line.
The program outputs the current value first, then increments it by 1 and waits 1000 ms. Changing it to 500 makes the output approximately twice as fast; restore the value to 1000.
8. Experimental Observations¶
After reset, the serial monitor should display content similar to the following:
Acceptance criteria: the text shows no garbled characters; the number increases by 1 per line; the interval between adjacent outputs is about 1 second; it runs continuously without interruption; and it restarts from 0 after pressing RESET. Whether the LCD displays the lesson text is not part of this lesson's acceptance criteria.
9. Code Download¶
Code path: Serial_port_printing.












