Setting Up The Development Environment With Esp32 Display
About the project
Learn how to set up your ESP32 Display with CrowPanel the tutorial. Perfect for beginners looking to get started with Elecrow's CrowPanel.
Project info
Difficulty: Easy
Estimated time: 1 hour
License: GNU General Public License, version 3 or later (GPL3+)
Items used in this project
Story
Hi everyone, welcome to the first lesson of Crow Panel. This tutorial will cover:
- Uploading Code and Using the Serial Port
- Connecting the Board to Your Computer
- Configuring Compilation Information
- Installing the ESP32 Board Package
- Setting up the CrowPanel Development Environment
Supplies
Elecrow CrowPanel - the ESP32 Display
Software: Arduino IDE
Step 1: Setting Up the Development Environment
I use the Arduino IDE for this project. Follow these steps to download and install the Arduino IDE:
Download the Arduino IDE:
- Visit the Arduino software page.
- Choose between Arduino IDE 2.3.2 (the latest version) and 1.8.19 (the classic version). The installation steps are the same for both. The only difference between them is the interface. This time, I will demonstrate how to install the latest version.
- Select the Windows version and choose one of the following installation methods:
i. EXE program: Allows custom installation paths. ii. MSI program: Automatically installs using the default path (recommended for beginners). iii. Compressed file: Can be used directly after extraction.
Install the Arduino IDE:
- For this tutorial, I use the MSI program. Click the MSI installer download link, then click "JUST DOWNLOAD" (or "CONTRIBUTE AND DOWNLOAD" to support Arduino).
- After downloading, run the MSI installer. It will automatically install the Arduino IDE. This process takes a few minutes.
- Once installed, the Arduino IDE icon is on my desktop.
Step 2: Installing the ESP32 Board Package
After installing the Arduino IDE, I have an editor that allows me to write and upload code. Now I need to install the ESP32 Board Package, making the Arduino IDE capable of developing for the ESP32. Please follow these steps to install the necessary board package:
- Open the Arduino IDE.
- Go to File > Preferences
- l In the "Additional boards manager URLs" field, click the button on the right and paste the following URL (by Espressif Systems): https://espressif.github.io/arduino-esp32/package_esp32_index.json
- l Click "OK" to save the settings. The Arduino IDE will download the JSON file, indicated by a progress bar in the lower right corner. When the download is complete, the progress bar will automatically disappear.
Install the ESP32 Board Package:
- l Go to Tools > Board > Boards Manager.
- Search for "ESP32" and find the package provided by Espressif Systems.
- Select version 2.0.15 and click "Install". (You can choose other versions. However, to reduce strange bugs, I recommend that you use version 2.0.15 as mine.)
Step 3: Configuring Compilation Information
Before uploading the code, I need to configure the compilation information to ensure my program runs correctly:
Open the Course File: find the provided code for the first lesson.
Select the Correct Board:
Go to Tools > Board and select the corresponding chip (you can find this table on the CrowPanel page) from the ESP32 package we have installed:
- 2.4-inch and 2.8-inch displays: Select ESP32-WROOM-DA Module.
- 3.5-inch display: Select ESP32-WROVER Module.
- 4.3-inch, 5-inch, and 7-inch displays: Select ESP32S3 Dev Module.
Additional Configuration for Larger Displays:
- For 4.3-inch displays: Set PSRAM to QSPI PSRAM.
- For 5-inch and 7-inch displays: Set PSRAM to OPI PSRAM.
- Go to Partition Scheme and select Huge APP. This will provide a larger memory space for storing code, but generally speaking, keeping the default option is sufficient for storing most of the code when not using the LVGL library
Step 4: Connecting the Board to Your Computer
Connect the Board:
- Use a USB Type-C cable to connect the board to your computer.
- Identify the correct COM port in Tools > Port. If your COM 1 existed before the board was connected, this is not the number of the board. Choose the correct COM port, mine is COM 6. But yours may be COM 3, COM 8, etc., determined by the system.
- If your computer cannot recognize the connected serial port after connecting to the board, it may be because you have not installed the CH340 driver. You need to install it first. The installation tool for this driver is in the Tool/CH340 folder.
Step 5: Uploading Code and Using the Serial Port
Write and Upload Code:
- In the Arduino IDE, open the code file. The code includes a setup function to initialize the serial port and a loop function for continuous operation.
- Set the baud rate to 9600 in the Serial.begin function.
Compile and Upload the Code:
- Click the upload button in the top left corner of the Arduino IDE.
Monitor Serial Output:
- After uploading, open the serial monitor by clicking the magnifying glass icon in the top right corner.
- Ensure the baud rate in the serial monitor matches the one in our code to avoid garbled text.
That's the end of the lesson - Setting Up the Development Environment with CrowPanel. If you found this lesson helpful, remember to stay tuned for more tutorials at Elecrow. You can also find more video tutorials on Elecrow's YouTube channel. See you next time!
Setting up the CrowPanel Development Environment
Installing the ESP32 Board Package
Configuring Compilation Information
Connecting the Board to Your Computer
Uploading Code and Using the Serial Port
Visit the Arduino software page.
Choose between Arduino IDE 2.3.2 (the latest version) and 1.8.19 (the classic version). The installation steps are the same for both. The only difference between them is the interface. This time, I will demonstrate how to install the latest version.
Select the Windows version and choose one of the following installation methods:
For this tutorial, I use the MSI program. Click the MSI installer download link, then click "JUST DOWNLOAD" (or "CONTRIBUTE AND DOWNLOAD" to support Arduino).
After downloading, run the MSI installer. It will automatically install the Arduino IDE. This process takes a few minutes.
Once installed, the Arduino IDE icon is on my desktop.
Open the Arduino IDE.
Go to File > Preferences.
In the "Additional boards manager URLs" field, click the button on the right and paste the following URL (by Espressif Systems):
Click "OK" to save the settings. The Arduino IDE will download the JSON file, indicated by a progress bar in the lower right corner. When the download is complete, the progress bar will automatically disappear.
Go to Tools > Board > Boards Manager.
Search for "ESP32" and find the package provided by Espressif Systems.
Select version 2.0.15 and click "Install". (You can choose other versions. However, to reduce strange bugs, I recommend that you use version 2.0.15 as mine.)
2.4-inch and 2.8-inch displays: Select ESP32-WROOM-DA Module.
3.5-inch display: Select ESP32-WROVER Module.
4.3-inch, 5-inch, and 7-inch displays: Select ESP32S3 Dev Module.
For 4.3-inch displays: Set PSRAM to QSPI PSRAM.
For 5-inch and 7-inch displays: Set PSRAM to OPI PSRAM.
Go to Partition Scheme and select Huge APP. This will provide a larger memory space for storing code, but generally speaking, keeping the default option is sufficient for storing most of the code when not using the LVGL library.
Use a USB Type-C cable to connect the board to your computer.
Identify the correct COM port in Tools > Port. If your COM 1 existed before the board was connected, this is not the number of the board. Choose the correct COM port, mine is COM 6. But yours may be COM 3, COM 8, etc., determined by the system.
If your computer cannot recognize the connected serial port after connecting to the board, it may be because you have not installed the CH340 driver. You need to install it first. The installation tool for this driver is in the Tool/CH340 folder.
In the Arduino IDE, open the code file. The code includes a setup function to initialize the serial port and a loop function for continuous operation.
Set the baud rate to 9600 in the Serial.begin function.
Click the upload button in the top left corner of the Arduino IDE.
After uploading, open the serial monitor by clicking the magnifying glass icon in the top right corner.
Ensure the baud rate in the serial monitor matches the one in our code to avoid garbled text.
Leave your feedback...